X-Git-Url: https://arthur.barton.de/gitweb/?a=blobdiff_plain;f=libatalk%2Funicode%2Futil_unistr.c;h=0eba9a3c25faaa4ce255db5fdff95aaeaf1e315c;hb=3a43b6ca05ec2b8f0494f8619a82d25204b7b457;hp=ce3355df980c84c0f65e65f13f9b55ddd6556a86;hpb=4e9103b8f614e81a66f4c21511cc8b97f25111c9;p=netatalk.git diff --git a/libatalk/unicode/util_unistr.c b/libatalk/unicode/util_unistr.c index ce3355df..0eba9a3c 100644 --- a/libatalk/unicode/util_unistr.c +++ b/libatalk/unicode/util_unistr.c @@ -291,12 +291,12 @@ int strcasecmp_w(const ucs2_t *a, const ucs2_t *b) while (*a && *b) { if ((0xD800 <= *a) && (*a < 0xDC00)) { - if (ret = tolower_sp((uint32_t)*a << 16 | (uint32_t)a[1]) - tolower_sp((uint32_t)*b << 16 | (uint32_t)b[1])) return ret; + if ((ret = tolower_sp((uint32_t)*a << 16 | (uint32_t)a[1]) - tolower_sp((uint32_t)*b << 16 | (uint32_t)b[1]))) return ret; a++; b++; if (!(*a && *b)) return (tolower_w(*a) - tolower_w(*b)); /* avoid buffer over run */ } else { - if (ret = tolower_w(*a) - tolower_w(*b)) return ret; + if ((ret = tolower_w(*a) - tolower_w(*b))) return ret; } a++; b++; @@ -317,13 +317,13 @@ int strncasecmp_w(const ucs2_t *a, const ucs2_t *b, size_t len) while ((n < len) && *a && *b) { if ((0xD800 <= *a) && (*a < 0xDC00)) { - if (ret = tolower_sp((uint32_t)*a << 16 | (uint32_t)a[1]) - tolower_sp((uint32_t)*b << 16 | (uint32_t)b[1])) return ret; + if ((ret = tolower_sp((uint32_t)*a << 16 | (uint32_t)a[1]) - tolower_sp((uint32_t)*b << 16 | (uint32_t)b[1]))) return ret; a++; b++; n++; if (!((n < len) && *a && *b)) return (tolower_w(*a) - tolower_w(*b)); } else { - if (ret = tolower_w(*a) - tolower_w(*b)) return ret; + if ((ret = tolower_w(*a) - tolower_w(*b))) return ret; } a++; b++; @@ -607,7 +607,7 @@ size_t precompose_w (ucs2_t *name, size_t inplen, ucs2_t *comp, size_t *outlen) base_sp = ((uint32_t)base << 16) | (uint32_t)comb; do { comb_sp = ((uint32_t)in[1] << 16) | (uint32_t)in[2]; - if (result_sp = do_precomposition_sp(base_sp, comb_sp)) { + if ((result_sp = do_precomposition_sp(base_sp, comb_sp))) { base_sp = result_sp; i += 4; in +=2; @@ -641,7 +641,7 @@ size_t precompose_w (ucs2_t *name, size_t inplen, ucs2_t *comp, size_t *outlen) } /* Binary Search for BMP */ - else if (result = do_precomposition(base, comb)) { + else if ((result = do_precomposition(base, comb))) { base = result; }