summaryrefslogtreecommitdiff
path: root/usr.bin/lam
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2013-11-20 21:22:18 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2013-11-20 21:22:18 +0000
commit3f5d52b467aa1e73045d7a5d4eda72ba96249674 (patch)
tree1933a0bf6824991d0c932a43e6b1bd1290c26bca /usr.bin/lam
parent64f6fe9f843c902e56004abaa88f148ea9d6d8e3 (diff)
unsigned char casts for ctype.h macros, when dealing with optarg
ok ratchov
Diffstat (limited to 'usr.bin/lam')
-rw-r--r--usr.bin/lam/lam.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/lam/lam.c b/usr.bin/lam/lam.c
index 231d25dfebe..87877952fc2 100644
--- a/usr.bin/lam/lam.c
+++ b/usr.bin/lam/lam.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lam.c,v 1.15 2013/11/15 22:20:04 millert Exp $ */
+/* $OpenBSD: lam.c,v 1.16 2013/11/20 21:22:17 deraadt Exp $ */
/* $NetBSD: lam.c,v 1.2 1994/11/14 20:27:42 jtc Exp $ */
/*-
@@ -110,7 +110,8 @@ getargs(int argc, char *argv[])
F = (ch == 'F');
/* Validate format string argument. */
for (p = optarg; *p != '\0'; p++)
- if (!isdigit(*p) && *p != '.' && *p != '-')
+ if (!isdigit((unsigned char)*p) &&
+ *p != '.' && *p != '-')
errx(1, "%s: invalid width specified",
optarg);
/* '%' + width + 's' + '\0' */