commit 0f1b2b646beb2639f73766f0e505000154892bbd
Author: Oswald Buddenhagen <[email protected]>
Date: Thu Nov 25 15:57:39 2021 +0100
remove questionable optimization from case-insensitive string comparison
we optimized the case where the string would be equal even without
upper-casing, but for the much more common case where the strings differ
even after upper-casing, this was just an additional conditional.
src/util.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/util.c b/src/util.c
index 419c6e12..3ac0e240 100644
--- a/src/util.c
+++ b/src/util.c
@@ -300,7 +300,7 @@ starts_with_upper( const char *str, int strl, const char
*cmp, uint cmpl )
if ((uint)strl < cmpl)
return 0;
for (uint i = 0; i < cmpl; i++)
- if (str[i] != cmp[i] && toupper( str[i] ) != cmp[i])
+ if (toupper( str[i] ) != cmp[i])
return 0;
return 1;
}
_______________________________________________
isync-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/isync-devel