diff options
author | Dave Voutila <dv@cvs.openbsd.org> | 2022-12-15 16:01:41 +0000 |
---|---|---|
committer | Dave Voutila <dv@cvs.openbsd.org> | 2022-12-15 16:01:41 +0000 |
commit | a95c9731172f6d811ffca0e7777a65c3f955172f (patch) | |
tree | e9a18c2389fadd9821e97bd69afbefeeb35def53 /usr.sbin/vmd | |
parent | 25da70449625ee214a213806183b5bfed62b7ba5 (diff) |
Add explicit casts to ctype functions in vmd(8).
OK millert@
Diffstat (limited to 'usr.sbin/vmd')
-rw-r--r-- | usr.sbin/vmd/priv.c | 4 | ||||
-rw-r--r-- | usr.sbin/vmd/vmd.c | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/usr.sbin/vmd/priv.c b/usr.sbin/vmd/priv.c index 2074de3b05f..860aac3f5f7 100644 --- a/usr.sbin/vmd/priv.c +++ b/usr.sbin/vmd/priv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: priv.c,v 1.19 2021/11/29 05:17:35 deraadt Exp $ */ +/* $OpenBSD: priv.c,v 1.20 2022/12/15 16:01:40 dv Exp $ */ /* * Copyright (c) 2016 Reyk Floeter <reyk@openbsd.org> @@ -319,7 +319,7 @@ priv_validgroup(const char *name) if (strlen(name) >= IF_NAMESIZE) return (-1); /* Group can not end with a digit */ - if (name[0] && isdigit(name[strlen(name) - 1])) + if (name[0] && isdigit((unsigned char)name[strlen(name) - 1])) return (-1); return (0); } diff --git a/usr.sbin/vmd/vmd.c b/usr.sbin/vmd/vmd.c index bd0d8580ffc..c7e22c0011a 100644 --- a/usr.sbin/vmd/vmd.c +++ b/usr.sbin/vmd/vmd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vmd.c,v 1.133 2022/10/31 14:02:11 dv Exp $ */ +/* $OpenBSD: vmd.c,v 1.134 2022/12/15 16:01:40 dv Exp $ */ /* * Copyright (c) 2015 Reyk Floeter <reyk@openbsd.org> @@ -1349,8 +1349,8 @@ vm_register(struct privsep *ps, struct vmop_create_params *vmc, goto fail; } else { for (s = vcp->vcp_name; *s != '\0'; ++s) { - if (!(isalnum(*s) || *s == '.' || *s == '-' || - *s == '_')) { + if (!(isalnum((unsigned char)*s) || *s == '.' || \ + *s == '-' || *s == '_')) { log_warnx("invalid VM name"); goto fail; } @@ -1896,7 +1896,7 @@ get_string(uint8_t *ptr, size_t len) size_t i; for (i = 0; i < len; i++) - if (!isprint(ptr[i])) + if (!isprint((unsigned char)ptr[i])) break; return strndup(ptr, i); |