1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-11-22 11:56:40 +00:00

Fix argument type for isalnum and toupper

This commit is contained in:
hexkyz 2019-07-02 17:22:28 +01:00
parent 09ab3efddd
commit d09be18359
3 changed files with 11 additions and 11 deletions

View file

@ -508,7 +508,7 @@ char *uuid_string(char *buf, char *end, const uint8_t *addr,
if (uc) { if (uc) {
p = uuid; p = uuid;
do { do {
*p = toupper(*p); *p = toupper((unsigned char)*p);
} while (*(++p)); } while (*(++p));
} }
@ -1177,7 +1177,7 @@ do { \
case FORMAT_TYPE_PTR: case FORMAT_TYPE_PTR:
save_arg(void *); save_arg(void *);
/* skip all alphanumeric pointer suffixes */ /* skip all alphanumeric pointer suffixes */
while (isalnum(*fmt)) while (isalnum((unsigned char)*fmt))
fmt++; fmt++;
break; break;
@ -1340,7 +1340,7 @@ int bstr_printf(char *buf, size_t size, const char *fmt, const uint32_t *bin_buf
case FORMAT_TYPE_PTR: case FORMAT_TYPE_PTR:
str = pointer(fmt+1, str, end, get_arg(void *), spec); str = pointer(fmt+1, str, end, get_arg(void *), spec);
while (isalnum(*fmt)) while (isalnum((unsigned char)*fmt))
fmt++; fmt++;
break; break;

View file

@ -508,7 +508,7 @@ char *uuid_string(char *buf, char *end, const uint8_t *addr,
if (uc) { if (uc) {
p = uuid; p = uuid;
do { do {
*p = toupper(*p); *p = toupper((unsigned char)*p);
} while (*(++p)); } while (*(++p));
} }
@ -882,7 +882,7 @@ int vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
case FORMAT_TYPE_PTR: case FORMAT_TYPE_PTR:
str = pointer(fmt+1, str, end, va_arg(args, void *), str = pointer(fmt+1, str, end, va_arg(args, void *),
spec); spec);
while (isalnum(*fmt)) while (isalnum((unsigned char)*fmt))
fmt++; fmt++;
break; break;
@ -1177,7 +1177,7 @@ do { \
case FORMAT_TYPE_PTR: case FORMAT_TYPE_PTR:
save_arg(void *); save_arg(void *);
/* skip all alphanumeric pointer suffixes */ /* skip all alphanumeric pointer suffixes */
while (isalnum(*fmt)) while (isalnum((unsigned char)*fmt))
fmt++; fmt++;
break; break;
@ -1340,7 +1340,7 @@ int bstr_printf(char *buf, size_t size, const char *fmt, const uint32_t *bin_buf
case FORMAT_TYPE_PTR: case FORMAT_TYPE_PTR:
str = pointer(fmt+1, str, end, get_arg(void *), spec); str = pointer(fmt+1, str, end, get_arg(void *), spec);
while (isalnum(*fmt)) while (isalnum((unsigned char)*fmt))
fmt++; fmt++;
break; break;

View file

@ -508,7 +508,7 @@ char *uuid_string(char *buf, char *end, const uint8_t *addr,
if (uc) { if (uc) {
p = uuid; p = uuid;
do { do {
*p = toupper(*p); *p = toupper((unsigned char)*p);
} while (*(++p)); } while (*(++p));
} }
@ -882,7 +882,7 @@ int vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
case FORMAT_TYPE_PTR: case FORMAT_TYPE_PTR:
str = pointer(fmt+1, str, end, va_arg(args, void *), str = pointer(fmt+1, str, end, va_arg(args, void *),
spec); spec);
while (isalnum(*fmt)) while (isalnum((unsigned char)*fmt))
fmt++; fmt++;
break; break;
@ -1177,7 +1177,7 @@ do { \
case FORMAT_TYPE_PTR: case FORMAT_TYPE_PTR:
save_arg(void *); save_arg(void *);
/* skip all alphanumeric pointer suffixes */ /* skip all alphanumeric pointer suffixes */
while (isalnum(*fmt)) while (isalnum((unsigned char)*fmt))
fmt++; fmt++;
break; break;
@ -1340,7 +1340,7 @@ int bstr_printf(char *buf, size_t size, const char *fmt, const uint32_t *bin_buf
case FORMAT_TYPE_PTR: case FORMAT_TYPE_PTR:
str = pointer(fmt+1, str, end, get_arg(void *), spec); str = pointer(fmt+1, str, end, get_arg(void *), spec);
while (isalnum(*fmt)) while (isalnum((unsigned char)*fmt))
fmt++; fmt++;
break; break;