From: Pierangelo Masarati Date: Sat, 6 Apr 2002 09:30:24 +0000 (+0000) Subject: fix ambiguous use of && and || (please check :) X-Git-Tag: OPENLDAP_REL_ENG_2_MP~247 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6b8e16efec6c50f15ee1e60ace87a4b83b597b49;p=openldap fix ambiguous use of && and || (please check :) --- diff --git a/libraries/liblunicode/ucstr.c b/libraries/liblunicode/ucstr.c index 839a0086e6..f0cc603322 100644 --- a/libraries/liblunicode/ucstr.c +++ b/libraries/liblunicode/ucstr.c @@ -269,7 +269,7 @@ int UTF8bvnormcmp( struct berval *bv2, unsigned flags ) { - int i, l1, l2, len, ulen, res; + int i, l1, l2, len, ulen, res = 0; char *s1, *s2, *done; unsigned long *ucs, *ucsout1, *ucsout2; unsigned casefold = flags & LDAP_UTF8_CASEFOLD; @@ -310,8 +310,8 @@ int UTF8bvnormcmp( if (!LDAP_UTF8_ISASCII(s1) || !LDAP_UTF8_ISASCII(s2)) { break; } - } else if ((len < l1) && !LDAP_UTF8_ISASCII(s1) || - (len < l2) && !LDAP_UTF8_ISASCII(s2)) { + } else if (((len < l1) && !LDAP_UTF8_ISASCII(s1)) || + ((len < l2) && !LDAP_UTF8_ISASCII(s2))) { break; } return res;