Module Name: src Committed By: rillig Date: Wed Aug 25 23:11:51 UTC 2021
Modified Files: src/usr.bin/db: db.c Log Message: db: fix lint warnings about wrong call to ctype functions To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/usr.bin/db/db.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/db/db.c diff -u src/usr.bin/db/db.c:1.26 src/usr.bin/db/db.c:1.27 --- src/usr.bin/db/db.c:1.26 Fri Feb 17 11:37:33 2012 +++ src/usr.bin/db/db.c Wed Aug 25 23:11:51 2021 @@ -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 @@ main(int argc, char *argv[]) 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 @@ db_makekey(DBT *key, char *keystr, int d 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 @@ parse_encode_option(char **arg) break; default: return (0); - break; } } return (r);