mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-02 03:52:49 -05:00
Never pass a `char' to a ctype function. I had relied on gcc -Wall
letting me know about instances of this, but it turns out that my ctype.h explicitly casts input values to `int' to evade the `subscript has type char' warning, so it had been carefully not letting me know! Found them all by compiling with a doctored ctype.h, and hopefully fixed them all too. [originally from svn r2927]
This commit is contained in:
6
proxy.c
6
proxy.c
@ -281,7 +281,7 @@ static int proxy_for_destination (SockAddr addr, char *hostname, int port,
|
||||
|
||||
while (exclude_list[s]) {
|
||||
while (exclude_list[s] &&
|
||||
(isspace(exclude_list[s]) ||
|
||||
(isspace((unsigned char)exclude_list[s]) ||
|
||||
exclude_list[s] == ',')) s++;
|
||||
|
||||
if (!exclude_list[s]) break;
|
||||
@ -289,7 +289,7 @@ static int proxy_for_destination (SockAddr addr, char *hostname, int port,
|
||||
e = s;
|
||||
|
||||
while (exclude_list[e] &&
|
||||
(isalnum(exclude_list[e]) ||
|
||||
(isalnum((unsigned char)exclude_list[e]) ||
|
||||
exclude_list[e] == '-' ||
|
||||
exclude_list[e] == '.' ||
|
||||
exclude_list[e] == '*')) e++;
|
||||
@ -325,7 +325,7 @@ static int proxy_for_destination (SockAddr addr, char *hostname, int port,
|
||||
|
||||
/* Make sure we really have reached the next comma or end-of-string */
|
||||
while (exclude_list[s] &&
|
||||
!isspace(exclude_list[s]) &&
|
||||
!isspace((unsigned char)exclude_list[s]) &&
|
||||
exclude_list[s] != ',') s++;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user