summaryrefslogtreecommitdiff
path: root/net/wireshark/patches/patch-ab
blob: 84df137449d3a4c4ec2176bfec055eb6c95d4b1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
$NetBSD: patch-ab,v 1.4 2013/12/18 11:52:25 tron Exp $

Fix compiler warning caused by improper use of toupper(3).

--- wiretap/dbs-etherwatch.c.orig	2007-07-06 12:52:45.000000000 +0200
+++ wiretap/dbs-etherwatch.c
@@ -624,13 +624,13 @@ parse_hex_dump(char* dump, guint8 *buf, 
 		if(isdigit((guchar)dump[pos])) {
 			buf[count] = (dump[pos] - '0') << 4;
 		} else {
-			buf[count] = (toupper(dump[pos]) - 'A' + 10) << 4;
+			buf[count] = (toupper((guchar)dump[pos]) - 'A' + 10) << 4;
 		}
 		pos++;
 		if(isdigit((guchar)dump[pos])) {
 			buf[count] += dump[pos] - '0';
 		} else {
-			buf[count] += toupper(dump[pos]) - 'A' + 10;
+			buf[count] += toupper((guchar)dump[pos]) - 'A' + 10;
 		}
 		pos++;
 		count++;