]> source.dussan.org Git - rspamd.git/commitdiff
Use rspamd_lc_cmp for fixed strings comparisions.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 7 Oct 2015 12:10:37 +0000 (13:10 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 7 Oct 2015 12:10:37 +0000 (13:10 +0100)
src/libutil/str_util.c

index a2093e484f5be453c7fdec1f3337aac9600ff2fa..ffed9893dbcca39040ccb6fbbfa2696f87948a6c 100644 (file)
@@ -268,7 +268,7 @@ rspamd_ftok_icase_equal (gconstpointer v, gconstpointer v2)
        const rspamd_ftok_t *f1 = v, *f2 = v2;
 
        if (f1->len == f2->len &&
-               g_ascii_strncasecmp (f1->begin, f2->begin, f1->len) == 0) {
+                       rspamd_lc_cmp (f1->begin, f2->begin, f1->len) == 0) {
                return TRUE;
        }
 
@@ -289,7 +289,7 @@ rspamd_gstring_icase_equal (gconstpointer v, gconstpointer v2)
 {
        const GString *f1 = v, *f2 = v2;
        if (f1->len == f2->len &&
-               g_ascii_strncasecmp (f1->str, f2->str, f1->len) == 0) {
+                       rspamd_lc_cmp (f1->str, f2->str, f1->len) == 0) {
                return TRUE;
        }