Add (unsigned char) cast to ctype function
This commit is contained in:
parent
9ab983c04a
commit
91d3fe12d9
6
dist/smbfs/lib/smb/nls.c
vendored
6
dist/smbfs/lib/smb/nls.c
vendored
@ -33,7 +33,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: nls.c,v 1.7 2004/08/02 13:38:21 tshiozak Exp $");
|
||||
__RCSID("$NetBSD: nls.c,v 1.8 2004/10/29 19:18:32 dsl Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
@ -189,7 +189,7 @@ nls_str_upper(char *dst, const char *src)
|
||||
char *p = dst;
|
||||
|
||||
while (*src)
|
||||
*dst++ = toupper(*src++);
|
||||
*dst++ = toupper((unsigned char)*src++);
|
||||
*dst = 0;
|
||||
return p;
|
||||
}
|
||||
@ -200,7 +200,7 @@ nls_str_lower(char *dst, const char *src)
|
||||
char *p = dst;
|
||||
|
||||
while (*src)
|
||||
*dst++ = tolower(*src++);
|
||||
*dst++ = tolower((unsigned char)*src++);
|
||||
*dst = 0;
|
||||
return p;
|
||||
}
|
||||
|
8
dist/smbfs/lib/smb/rap.c
vendored
8
dist/smbfs/lib/smb/rap.c
vendored
@ -35,7 +35,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: rap.c,v 1.4 2003/10/21 02:36:06 fvdl Exp $");
|
||||
__RCSID("$NetBSD: rap.c,v 1.5 2004/10/29 19:18:32 dsl Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/errno.h>
|
||||
@ -81,7 +81,7 @@ smb_rap_parserqparam(const char *s, char **next, int *rlen)
|
||||
default:
|
||||
return EINVAL;
|
||||
}
|
||||
if (isdigit(*s)) {
|
||||
if (isdigit((unsigned char)*s)) {
|
||||
len *= strtoul(s, &np, 10);
|
||||
s = np;
|
||||
}
|
||||
@ -111,7 +111,7 @@ smb_rap_parserpparam(const char *s, char **next, int *rlen)
|
||||
default:
|
||||
return EINVAL;
|
||||
}
|
||||
if (isdigit(*s)) {
|
||||
if (isdigit((unsigned char)*s)) {
|
||||
len *= strtoul(s, &np, 10);
|
||||
s = np;
|
||||
}
|
||||
@ -142,7 +142,7 @@ smb_rap_parserpdata(const char *s, char **next, int *rlen)
|
||||
default:
|
||||
return EINVAL;
|
||||
}
|
||||
if (isdigit(*s)) {
|
||||
if (isdigit((unsigned char)*s)) {
|
||||
len *= strtoul(s, &np, 10);
|
||||
s = np;
|
||||
}
|
||||
|
4
dist/smbfs/lib/smb/rcfile.c
vendored
4
dist/smbfs/lib/smb/rcfile.c
vendored
@ -33,7 +33,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: rcfile.c,v 1.4 2003/04/04 08:05:36 jdolecek Exp $");
|
||||
__RCSID("$NetBSD: rcfile.c,v 1.5 2004/10/29 19:18:32 dsl Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/queue.h>
|
||||
@ -392,7 +392,7 @@ rc_getbool(struct rcfile *rcp, const char *section, const char *key, int *value)
|
||||
rkp = rc_sect_findkey(rsp,key);
|
||||
if (!rkp) return ENOENT;
|
||||
p = rkp->rk_value;
|
||||
while (*p && isspace(*p)) p++;
|
||||
while (*p && isspace((unsigned char)*p)) p++;
|
||||
if (*p == '0' || strcasecmp(p,"no") == 0 || strcasecmp(p,"false") == 0) {
|
||||
*value = 0;
|
||||
return 0;
|
||||
|
8
dist/smbfs/mount_smbfs/mount_smbfs.c
vendored
8
dist/smbfs/mount_smbfs/mount_smbfs.c
vendored
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mount_smbfs.c,v 1.7 2004/03/21 08:35:18 jdolecek Exp $ */
|
||||
/* $NetBSD: mount_smbfs.c,v 1.8 2004/10/29 19:15:20 dsl Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2000-2002, Boris Popov
|
||||
@ -35,7 +35,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: mount_smbfs.c,v 1.7 2004/03/21 08:35:18 jdolecek Exp $");
|
||||
__RCSID("$NetBSD: mount_smbfs.c,v 1.8 2004/10/29 19:15:20 dsl Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/stat.h>
|
||||
@ -118,7 +118,7 @@ main(int argc, char *argv[])
|
||||
case 'u': {
|
||||
struct passwd *pwd;
|
||||
|
||||
pwd = isdigit(optarg[0]) ?
|
||||
pwd = isdigit((unsigned char)optarg[0]) ?
|
||||
getpwuid(atoi(optarg)) : getpwnam(optarg);
|
||||
if (pwd == NULL)
|
||||
errx(EX_NOUSER, "unknown user '%s'", optarg);
|
||||
@ -128,7 +128,7 @@ main(int argc, char *argv[])
|
||||
case 'g': {
|
||||
struct group *grp;
|
||||
|
||||
grp = isdigit(optarg[0]) ?
|
||||
grp = isdigit((unsigned char)optarg[0]) ?
|
||||
getgrgid(atoi(optarg)) : getgrnam(optarg);
|
||||
if (grp == NULL)
|
||||
errx(EX_NOUSER, "unknown group '%s'", optarg);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ping6.c,v 1.60 2004/06/09 01:59:20 itojun Exp $ */
|
||||
/* $NetBSD: ping6.c,v 1.61 2004/10/29 19:20:36 dsl Exp $ */
|
||||
/* $KAME: ping6.c,v 1.164 2002/11/16 14:05:37 itojun Exp $ */
|
||||
|
||||
/*
|
||||
@ -77,7 +77,7 @@ static char sccsid[] = "@(#)ping.c 8.1 (Berkeley) 6/5/93";
|
||||
#else
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: ping6.c,v 1.60 2004/06/09 01:59:20 itojun Exp $");
|
||||
__RCSID("$NetBSD: ping6.c,v 1.61 2004/10/29 19:20:36 dsl Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -2583,7 +2583,7 @@ fill(bp, patp)
|
||||
char *cp;
|
||||
|
||||
for (cp = patp; *cp; cp++)
|
||||
if (!isxdigit(*cp))
|
||||
if (!isxdigit((unsigned char)*cp))
|
||||
errx(1, "patterns must be specified as hex digits");
|
||||
ii = sscanf(patp,
|
||||
"%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x",
|
||||
|
Loading…
Reference in New Issue
Block a user