summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2013-11-20 20:54:11 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2013-11-20 20:54:11 +0000
commit8927102be4f9fac5a25493cde928757927c4438e (patch)
treedfa99c8ab3b39b8e69aecab8c2df4945d35e2550
parent88e5ac60048b333effb71fe9e7b3c3926a1f7cf1 (diff)
unsigned casts for ctype macros where neccessary
ok guenther millert markus
-rw-r--r--bin/rcp/rcp.c4
-rw-r--r--bin/rcp/util.c5
-rw-r--r--usr.bin/ssh/canohost.c3
-rw-r--r--usr.bin/ssh/clientloop.c8
-rw-r--r--usr.bin/ssh/match.c6
-rw-r--r--usr.bin/ssh/readconf.c4
-rw-r--r--usr.bin/ssh/scp.c6
-rw-r--r--usr.bin/ssh/sftp.c4
8 files changed, 20 insertions, 20 deletions
diff --git a/bin/rcp/rcp.c b/bin/rcp/rcp.c
index 8c58b9c2937..18cd765240a 100644
--- a/bin/rcp/rcp.c
+++ b/bin/rcp/rcp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rcp.c,v 1.53 2013/11/12 04:36:02 deraadt Exp $ */
+/* $OpenBSD: rcp.c,v 1.54 2013/11/20 20:53:55 deraadt Exp $ */
/* $NetBSD: rcp.c,v 1.9 1995/03/21 08:19:06 cgd Exp $ */
/*
@@ -652,7 +652,7 @@ sink(int argc, char *argv[])
if (*cp++ != ' ')
SCREWUP("mode not delimited");
- for (size = 0; isdigit(*cp);)
+ for (size = 0; isdigit((unsigned char)*cp);)
size = size * 10 + (*cp++ - '0');
if (*cp++ != ' ')
SCREWUP("size not delimited");
diff --git a/bin/rcp/util.c b/bin/rcp/util.c
index c96eec5bc70..6c0320a20c2 100644
--- a/bin/rcp/util.c
+++ b/bin/rcp/util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.19 2009/10/27 23:59:22 deraadt Exp $ */
+/* $OpenBSD: util.c,v 1.20 2013/11/20 20:53:55 deraadt Exp $ */
/* $NetBSD: util.c,v 1.2 1995/03/21 08:19:08 cgd Exp $ */
/*-
@@ -86,7 +86,8 @@ okname(char *cp0)
c = *cp;
if (c & 0200)
goto bad;
- if (!isalpha(c) && !isdigit(c) && c != '_' && c != '-')
+ if (!isalpha((unsigned char)c) &&
+ !isdigit((unsigned char)c) && c != '_' && c != '-')
goto bad;
} while (*++cp);
return (1);
diff --git a/usr.bin/ssh/canohost.c b/usr.bin/ssh/canohost.c
index ecd260b7ab8..7f1fefb1253 100644
--- a/usr.bin/ssh/canohost.c
+++ b/usr.bin/ssh/canohost.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: canohost.c,v 1.68 2013/10/14 23:28:22 djm Exp $ */
+/* $OpenBSD: canohost.c,v 1.69 2013/11/20 20:54:10 deraadt Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -17,7 +17,6 @@
#include <netinet/in.h>
-#include <ctype.h>
#include <errno.h>
#include <netdb.h>
#include <stdio.h>
diff --git a/usr.bin/ssh/clientloop.c b/usr.bin/ssh/clientloop.c
index d938ac698a9..3d9dd4399a9 100644
--- a/usr.bin/ssh/clientloop.c
+++ b/usr.bin/ssh/clientloop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clientloop.c,v 1.255 2013/11/08 00:39:15 djm Exp $ */
+/* $OpenBSD: clientloop.c,v 1.256 2013/11/20 20:54:10 deraadt Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -281,7 +281,7 @@ client_x11_display_valid(const char *display)
dlen = strlen(display);
for (i = 0; i < dlen; i++) {
- if (!isalnum(display[i]) &&
+ if (!isalnum((u_char)display[i]) &&
strchr(SSH_X11_VALID_DISPLAY_CHARS, display[i]) == NULL) {
debug("Invalid character '%c' in DISPLAY", display[i]);
return 0;
@@ -875,7 +875,7 @@ process_cmdline(void)
cmd = s = read_passphrase("\r\nssh> ", RP_ECHO);
if (s == NULL)
goto out;
- while (isspace(*s))
+ while (isspace((u_char)*s))
s++;
if (*s == '-')
s++; /* Skip cmdline '-', if any */
@@ -929,7 +929,7 @@ process_cmdline(void)
goto out;
}
- while (isspace(*++s))
+ while (isspace((u_char)*++s))
;
/* XXX update list of forwards in options */
diff --git a/usr.bin/ssh/match.c b/usr.bin/ssh/match.c
index 462e0e00ce9..156c08c019f 100644
--- a/usr.bin/ssh/match.c
+++ b/usr.bin/ssh/match.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: match.c,v 1.28 2013/05/17 00:13:13 djm Exp $ */
+/* $OpenBSD: match.c,v 1.29 2013/11/20 20:54:10 deraadt Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -139,8 +139,8 @@ match_pattern_list(const char *string, const char *pattern, u_int len,
for (subi = 0;
i < len && subi < sizeof(sub) - 1 && pattern[i] != ',';
subi++, i++)
- sub[subi] = dolower && isupper(pattern[i]) ?
- (char)tolower(pattern[i]) : pattern[i];
+ sub[subi] = dolower && isupper((u_char)pattern[i]) ?
+ tolower((u_char)pattern[i]) : pattern[i];
/* If subpattern too long, return failure (no match). */
if (subi >= sizeof(sub) - 1)
return 0;
diff --git a/usr.bin/ssh/readconf.c b/usr.bin/ssh/readconf.c
index dee5a0b44e8..569fb2ed82d 100644
--- a/usr.bin/ssh/readconf.c
+++ b/usr.bin/ssh/readconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: readconf.c,v 1.213 2013/10/24 00:51:48 dtucker Exp $ */
+/* $OpenBSD: readconf.c,v 1.214 2013/11/20 20:54:10 deraadt Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1745,7 +1745,7 @@ parse_forward(Forward *fwd, const char *fwdspec, int dynamicfwd, int remotefwd)
cp = p = xstrdup(fwdspec);
/* skip leading spaces */
- while (isspace(*cp))
+ while (isspace((u_char)*cp))
cp++;
for (i = 0; i < 4; ++i)
diff --git a/usr.bin/ssh/scp.c b/usr.bin/ssh/scp.c
index 7bb921bbb2c..e1a6ba94d27 100644
--- a/usr.bin/ssh/scp.c
+++ b/usr.bin/ssh/scp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scp.c,v 1.178 2013/06/22 06:31:57 djm Exp $ */
+/* $OpenBSD: scp.c,v 1.179 2013/11/20 20:53:10 deraadt Exp $ */
/*
* scp - secure remote copy. This is basically patched BSD rcp which
* uses ssh to do the data transfer (instead of using rcmd).
@@ -1002,7 +1002,7 @@ sink(int argc, char **argv)
if (*cp++ != ' ')
SCREWUP("mode not delimited");
- for (size = 0; isdigit(*cp);)
+ for (size = 0; isdigit((unsigned char)*cp);)
size = size * 10 + (*cp++ - '0');
if (*cp++ != ' ')
SCREWUP("size not delimited");
@@ -1258,7 +1258,7 @@ okname(char *cp0)
c = (int)*cp;
if (c & 0200)
goto bad;
- if (!isalpha(c) && !isdigit(c)) {
+ if (!isalpha(c) && !isdigit((unsigned char)c)) {
switch (c) {
case '\'':
case '"':
diff --git a/usr.bin/ssh/sftp.c b/usr.bin/ssh/sftp.c
index 1ec781656cd..61ad77898b9 100644
--- a/usr.bin/ssh/sftp.c
+++ b/usr.bin/ssh/sftp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sftp.c,v 1.157 2013/10/17 07:35:48 jmc Exp $ */
+/* $OpenBSD: sftp.c,v 1.158 2013/11/20 20:54:10 deraadt Exp $ */
/*
* Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
*
@@ -1044,7 +1044,7 @@ makeargv(const char *arg, int *argcp, int sloppy, char *lastquote,
error("Too many arguments.");
return NULL;
}
- if (isspace(arg[i])) {
+ if (isspace((unsigned char)arg[i])) {
if (state == MA_UNQUOTED) {
/* Terminate current argument */
argvs[j++] = '\0';