summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
Diffstat (limited to 'sbin')
-rw-r--r--sbin/fsck/preen.c4
-rw-r--r--sbin/newfs_ext2fs/newfs_ext2fs.c6
-rw-r--r--sbin/newfs_msdos/newfs_msdos.c8
3 files changed, 9 insertions, 9 deletions
diff --git a/sbin/fsck/preen.c b/sbin/fsck/preen.c
index fc4993ef5f9..342695c75c6 100644
--- a/sbin/fsck/preen.c
+++ b/sbin/fsck/preen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: preen.c,v 1.18 2010/11/29 17:28:29 ckuethe Exp $ */
+/* $OpenBSD: preen.c,v 1.19 2013/11/22 04:14:00 deraadt Exp $ */
/* $NetBSD: preen.c,v 1.15 1996/09/28 19:21:42 christos Exp $ */
/*
@@ -245,7 +245,7 @@ finddisk(const char *name)
struct diskentry *d;
for (p = name + strlen(name) - 1; p >= name; --p)
- if (isdigit(*p)) {
+ if (isdigit((unsigned char)*p)) {
len = p - name + 1;
break;
}
diff --git a/sbin/newfs_ext2fs/newfs_ext2fs.c b/sbin/newfs_ext2fs/newfs_ext2fs.c
index 49776178cd4..a1bb4e0d5f6 100644
--- a/sbin/newfs_ext2fs/newfs_ext2fs.c
+++ b/sbin/newfs_ext2fs/newfs_ext2fs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: newfs_ext2fs.c,v 1.8 2013/10/27 18:54:03 guenther Exp $ */
+/* $OpenBSD: newfs_ext2fs.c,v 1.9 2013/11/22 04:14:01 deraadt Exp $ */
/* $NetBSD: newfs_ext2fs.c,v 1.8 2009/03/02 10:38:13 tsutsui Exp $ */
/*
@@ -518,10 +518,10 @@ getpartition(int fsi, const char *special, char *argv[], struct disklabel **dl)
warnx("%s: not a character-special device", special);
cp = strchr(argv[0], '\0') - 1;
if (cp == NULL || ((*cp < 'a' || *cp > ('a' + getmaxpartitions() - 1))
- && !isdigit(*cp)))
+ && !isdigit((unsigned char)*cp)))
errx(EXIT_FAILURE, "%s: can't figure out file system partition", argv[0]);
lp = getdisklabel(special, fsi);
- if (isdigit(*cp))
+ if (isdigit((unsigned char)*cp))
pp = &lp->d_partitions[0];
else
pp = &lp->d_partitions[*cp - 'a'];
diff --git a/sbin/newfs_msdos/newfs_msdos.c b/sbin/newfs_msdos/newfs_msdos.c
index a876ec7835a..ada79a20dc3 100644
--- a/sbin/newfs_msdos/newfs_msdos.c
+++ b/sbin/newfs_msdos/newfs_msdos.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: newfs_msdos.c,v 1.21 2013/11/05 00:51:58 krw Exp $ */
+/* $OpenBSD: newfs_msdos.c,v 1.22 2013/11/22 04:14:01 deraadt Exp $ */
/*
* Copyright (c) 1998 Robert Nordier
@@ -714,11 +714,11 @@ getdiskinfo(int fd, const char *fname, const char *dtype, int oflag,
s1 = fname;
if ((s2 = strrchr(s1, '/')))
s1 = s2 + 1;
- for (s2 = s1; *s2 && !isdigit(*s2); s2++);
+ for (s2 = s1; *s2 && !isdigit((unsigned char)*s2); s2++);
if (!*s2 || s2 == s1)
s2 = NULL;
else
- while (isdigit(*++s2));
+ while (isdigit((unsigned char)*++s2));
s1 = s2;
if (s2 && *s2 >= 'a' && *s2 <= 'a' + MAXPARTITIONS - 1) {
part = *s2++ - 'a';
@@ -841,7 +841,7 @@ mklabel(u_int8_t *dest, const char *src)
int c, i;
for (i = 0; i < 11; i++) {
- c = *src ? toupper(*src++) : ' ';
+ c = *src ? toupper((unsigned char)*src++) : ' ';
*dest++ = !i && c == '\xe5' ? 5 : c;
}
}