mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 23:27:04 +02:00
BUILD: sock_unix: fix build issue with isdigit()
Commit 0d06df6
("MINOR: sock: introduce sock_inet and sock_unix")
made use of isdigit() on the UNIX socket path without casting the
value to unsigned char, breaking the build on cygwin and possibly
other platforms. No backport is needed.
This commit is contained in:
parent
9dbb6c43ce
commit
1c34b881c3
@ -80,7 +80,7 @@ int sock_unix_addrcmp(const struct sockaddr_storage *a, const struct sockaddr_st
|
||||
|
||||
/* First, check in path "a" */
|
||||
if (au->sun_path[idx] != 0) {
|
||||
for (idx2 = dot + 1; idx2 && isdigit(au->sun_path[idx2]);)
|
||||
for (idx2 = dot + 1; idx2 && isdigit((unsigned char)au->sun_path[idx2]);)
|
||||
idx2++;
|
||||
if (strcmp(au->sun_path + idx2, ".tmp") != 0)
|
||||
return -1;
|
||||
@ -88,7 +88,7 @@ int sock_unix_addrcmp(const struct sockaddr_storage *a, const struct sockaddr_st
|
||||
|
||||
/* Then check in path "b" */
|
||||
if (bu->sun_path[idx] != 0) {
|
||||
for (idx2 = dot + 1; idx2 && isdigit(bu->sun_path[idx2]); idx2++)
|
||||
for (idx2 = dot + 1; idx2 && isdigit((unsigned char)bu->sun_path[idx2]); idx2++)
|
||||
;
|
||||
if (strcmp(bu->sun_path + idx2, ".tmp") != 0)
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user