2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 06:15:37 +00:00

Add casts to unsigned char for isspace() to quiet a gcc warning.

This commit is contained in:
Todd C. Miller
2004-10-26 22:17:15 +00:00
parent 9c14a99988
commit 0de1515d06

8
ldap.c
View File

@@ -505,23 +505,23 @@ sudo_ldap_read_config()
if (!*c) continue; /* incomplete last line */
/* skip whitespace before keyword */
while (isspace(*c)) c++;
while (isspace((unsigned char)*c)) c++;
keyword=c;
/* properly terminate keyword string */
while (*c && !isspace(*c)) c++;
while (*c && !isspace((unsigned char)*c)) c++;
if (*c) {
*c='\0'; /* terminate keyword */
c++;
}
/* skip whitespace before value */
while (isspace(*c)) c++;
while (isspace((unsigned char)*c)) c++;
value=c;
/* trim whitespace after value */
while (*c) c++; /* wind to end */
while (--c > value && isspace(*c)) *c='\0';
while (--c > value && isspace((unsigned char)*c)) *c='\0';
/* The following macros make the code much more readable */