Use toupper() correctly. Caught by clang.

This commit is contained in:
dholland 2011-09-03 21:59:18 +00:00
parent 4b6fb1ab3d
commit 6bbdb91741
2 changed files with 17 additions and 1 deletions

View file

@ -1,7 +1,8 @@
$NetBSD: distinfo,v 1.3 2011/08/29 01:27:29 dholland Exp $
$NetBSD: distinfo,v 1.4 2011/09/03 21:59:18 dholland Exp $
SHA1 (uisp-20040311.tar.bz2) = 8e4c1e05d2f9a962b8969fc76d8b448c9e0751d4
RMD160 (uisp-20040311.tar.bz2) = 4f45d375e942376a2508232cf787f94ab7f8995b
Size (uisp-20040311.tar.bz2) = 142973 bytes
SHA1 (patch-aa) = 60d42fc897b8c77c8396823fd9b26b95adb68a77
SHA1 (patch-src_avr_h) = f5ac07e1a8e3865e7c6bd3af86a1777bb068b5fd
SHA1 (patch-src_dapa_c) = bc3fd2ecde373af2a2a3864f07efedd1177ecca0

View file

@ -0,0 +1,15 @@
$NetBSD: patch-src_dapa_c,v 1.1 2011/09/03 21:59:18 dholland Exp $
Use toupper correctly. (clang complains and fails the build)
--- src/DAPA.C~ 2004-02-07 18:54:06.000000000 +0000
+++ src/DAPA.C
@@ -1128,7 +1128,7 @@ TDAPA::TDAPA():
strncpy(temp, val, MAXLINESIZE-1);
temp[MAXLINESIZE-1] = '\0';
for (p=temp; *p; p++)
- *p=toupper(*p);
+ *p=toupper((unsigned char)*p);
Info(3, "Inverting %s\n",temp);
if (strstr(temp,"SCK"))
sck_invert=1;