Skip to content

Commit

Permalink
Fix a toupper() usage too to avoid negative signed chars.
Browse files Browse the repository at this point in the history
  • Loading branch information
he32 committed Feb 12, 2015
1 parent 081ad7c commit c95ee19
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/units.c
Expand Up @@ -58,6 +58,7 @@
#include <stdint.h>
#endif
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/time.h>
#include <netinet/tcp.h>

Expand Down Expand Up @@ -261,7 +262,7 @@ extern "C"
{
inNum *= 8;
}
switch (toupper(inFormat))
switch (toupper((u_char)inFormat))
{
case 'B':
conv = UNIT_CONV;
Expand Down

0 comments on commit c95ee19

Please sign in to comment.