diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2012-03-19 08:02:06 +0100 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2012-03-30 08:51:06 -0400 |
commit | ab39dad6572ebf2f0dda53d703d0323a848547d8 (patch) | |
tree | c754e18c2e662ec687eae39a09c267f8d818ef3d /src/util/sss_utf8.c | |
parent | aad27b6b3581e1f4244c4b22cfcb1534506bb68d (diff) | |
download | sssd-ab39dad6572ebf2f0dda53d703d0323a848547d8.tar.gz sssd-ab39dad6572ebf2f0dda53d703d0323a848547d8.tar.xz sssd-ab39dad6572ebf2f0dda53d703d0323a848547d8.zip |
Make the string_equal() function publicsssd-1.8.0-20.el6
Diffstat (limited to 'src/util/sss_utf8.c')
-rw-r--r-- | src/util/sss_utf8.c | 9 |
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; +} |