summaryrefslogtreecommitdiffstats
path: root/src/util/sss_utf8.c
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2012-03-19 08:02:06 +0100
committerStephen Gallagher <sgallagh@redhat.com>2012-03-21 11:22:39 -0400
commitafde61e7e656abded3eb2f393cb8390ba013c0a6 (patch)
treeabb6746e2b3fafb925de143dc896989963cd34f7 /src/util/sss_utf8.c
parent0a91a2310a2ba53ce72838f931490dc96f1794cc (diff)
downloadsssd-afde61e7e656abded3eb2f393cb8390ba013c0a6.tar.gz
sssd-afde61e7e656abded3eb2f393cb8390ba013c0a6.tar.xz
sssd-afde61e7e656abded3eb2f393cb8390ba013c0a6.zip
Make the string_equal() function public
Diffstat (limited to 'src/util/sss_utf8.c')
-rw-r--r--src/util/sss_utf8.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/util/sss_utf8.c b/src/util/sss_utf8.c
index 7997a6df4..27c5cb60a 100644
--- a/src/util/sss_utf8.c
+++ b/src/util/sss_utf8.c
@@ -171,3 +171,12 @@ errno_t sss_utf8_case_eq(const uint8_t *s1, const uint8_t *s2)
#else
#error No unicode library
#endif
+
+bool sss_string_equal(bool cs, const char *s1, const char *s2)
+{
+ if (cs) {
+ return strcmp(s1, s2) == 0;
+ }
+
+ return sss_utf8_case_eq((const uint8_t *)s1, (const uint8_t *)s2) == EOK;
+}