Fix warnings about using a char array index on NetBSD.

The isspace macro is just a table lookup.
This commit is contained in:
Tommie Gannert 2016-08-14 12:35:52 +01:00
parent a937693cef
commit eb0b6412af

View File

@ -407,9 +407,9 @@ void print_battery_info(yajl_gen json_gen, char *buffer, int number, const char
#define EAT_SPACE_FROM_OUTPUT_IF_NO_OUTPUT() \
do { \
if (outwalk == prevoutwalk) { \
if (outwalk > buffer && isspace(outwalk[-1])) \
if (outwalk > buffer && isspace((int)outwalk[-1])) \
outwalk--; \
else if (isspace(*(walk + 1))) \
else if (isspace((int)*(walk + 1))) \
walk++; \
} \
} while (0)