diff options
author | Igor Sysoev <igor@sysoev.ru> | 2019-10-10 19:37:40 +0300 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2019-10-10 19:37:40 +0300 |
commit | ec0d5c928efcfb2d4958246d686718cb9747f722 (patch) | |
tree | 7db3f61085e0a3adcdcb26e5ebdde16ce4e05f48 /src/nxt_string.c | |
parent | 75453479f3d1d1c865ed2e2a51618dd014642e6f (diff) | |
download | unit-ec0d5c928efcfb2d4958246d686718cb9747f722.tar.gz unit-ec0d5c928efcfb2d4958246d686718cb9747f722.tar.bz2 |
Changed nxt_memcasecmp() interface to avoid casts.
Diffstat (limited to 'src/nxt_string.c')
-rw-r--r-- | src/nxt_string.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/nxt_string.c b/src/nxt_string.c index b89e9555..d567883f 100644 --- a/src/nxt_string.c +++ b/src/nxt_string.c @@ -188,10 +188,14 @@ nxt_strncasecmp(const u_char *s1, const u_char *s2, size_t length) nxt_int_t -nxt_memcasecmp(const u_char *s1, const u_char *s2, size_t length) +nxt_memcasecmp(const void *p1, const void *p2, size_t length) { - u_char c1, c2; - nxt_int_t n; + u_char c1, c2; + nxt_int_t n; + const u_char *s1, *s2; + + s1 = p1; + s2 = p2; while (length-- != 0) { c1 = *s1++; |