Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/db db: fix lint warnings about wrong call to ctype f...
details: https://anonhg.NetBSD.org/src/rev/0a870d0eabaf
branches: trunk
changeset: 1023125:0a870d0eabaf
user: rillig <rillig%NetBSD.org@localhost>
date: Wed Aug 25 23:11:51 2021 +0000
description:
db: fix lint warnings about wrong call to ctype functions
diffstat:
usr.bin/db/db.c | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diffs (46 lines):
diff -r 8fbacd99369a -r 0a870d0eabaf usr.bin/db/db.c
--- a/usr.bin/db/db.c Wed Aug 25 23:07:34 2021 +0000
+++ b/usr.bin/db/db.c Wed Aug 25 23:11:51 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db.c,v 1.26 2012/02/17 11:37:33 apb Exp $ */
+/* $NetBSD: db.c,v 1.27 2021/08/25 23:11:51 rillig Exp $ */
/*-
* Copyright (c) 2002-2009 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
#include <sys/cdefs.h>
#ifndef lint
#ifdef __RCSID
-__RCSID("$NetBSD: db.c,v 1.26 2012/02/17 11:37:33 apb Exp $");
+__RCSID("$NetBSD: db.c,v 1.27 2021/08/25 23:11:51 rillig Exp $");
#endif /* __RCSID */
#endif /* not lint */
@@ -139,7 +139,7 @@
case 'E':
if (! optarg[0] || optarg[1])
goto badendian;
- switch (toupper((int)optarg[0])) {
+ switch (toupper((unsigned char)optarg[0])) {
case 'B':
flags |= F_ENDIAN_BIG;
break;
@@ -441,8 +441,8 @@
key->size = klen + (flags & F_INCLUDE_NUL ? 0 : 1);
if (downcase && (flags & F_IGNORECASE)) {
for (p = ks; *p; p++)
- if (isupper((int)*p))
- *p = tolower((int)*p);
+ if (isupper((unsigned char)*p))
+ *p = tolower((unsigned char)*p);
}
}
@@ -705,7 +705,6 @@
break;
default:
return (0);
- break;
}
}
return (r);
Home |
Main Index |
Thread Index |
Old Index