From b5d4128bee88b42cb32337a6343bb44574ff2f3a Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Thu, 10 Jul 2014 17:27:49 -0700 Subject: Avoid sign-extending bytes before handing them to macros. Pointed out by the Visual Studio code analyzer. Change-Id: Idd429b4d0fb3db11ce171c3a5b38bdc55cc53c15 Reviewed-on: https://code.wireshark.org/review/2988 Reviewed-by: Guy Harris --- wiretap/catapult_dct2000.c | 2 +- wiretap/iseries.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'wiretap') diff --git a/wiretap/catapult_dct2000.c b/wiretap/catapult_dct2000.c index c8cf46d53b..63a261fe01 100644 --- a/wiretap/catapult_dct2000.c +++ b/wiretap/catapult_dct2000.c @@ -1118,7 +1118,7 @@ parse_line(gchar *linebuff, gint line_length, /* If there is a number, skip all info to next '/'. TODO: for IP encapsulation, should store PDCP ueid, drb in pseudo info and display dct2000 dissector... */ - if (isdigit(linebuff[n])) { + if (isdigit((guchar)linebuff[n])) { while ((n+1 < line_length) && linebuff[n] != '/') { n++; } diff --git a/wiretap/iseries.c b/wiretap/iseries.c index dec299bb04..62ee92b8dd 100644 --- a/wiretap/iseries.c +++ b/wiretap/iseries.c @@ -718,7 +718,7 @@ iseries_parse_packet (wtap * wth, FILE_T fh, struct wtap_pkthdr *phdr, /* * Skip leading white space. */ - for (offset = 0; isspace(data[offset]); offset++) + for (offset = 0; isspace((guchar)data[offset]); offset++) ; /* -- cgit v1.2.3