summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/libc/gen/disklabel.c4
-rw-r--r--lib/libc/gen/getcwd.c4
-rw-r--r--lib/libc/gen/vis.c5
3 files changed, 7 insertions, 6 deletions
diff --git a/lib/libc/gen/disklabel.c b/lib/libc/gen/disklabel.c
index 56d6f081820..4ceabf90cf5 100644
--- a/lib/libc/gen/disklabel.c
+++ b/lib/libc/gen/disklabel.c
@@ -32,7 +32,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: disklabel.c,v 1.4 1997/07/23 21:04:04 kstailey Exp $";
+static char rcsid[] = "$OpenBSD: disklabel.c,v 1.5 2000/07/19 15:25:13 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
@@ -168,7 +168,7 @@ gettype(t, names)
for (nm = names; *nm; nm++)
if (strcasecmp(t, *nm) == 0)
return (nm - names);
- if (isdigit(*t))
+ if (isdigit((u_char)*t))
return (atoi(t));
return (0);
}
diff --git a/lib/libc/gen/getcwd.c b/lib/libc/gen/getcwd.c
index 5234bb8ff67..c85fd5ead14 100644
--- a/lib/libc/gen/getcwd.c
+++ b/lib/libc/gen/getcwd.c
@@ -32,7 +32,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: getcwd.c,v 1.5 1998/08/14 21:39:26 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: getcwd.c,v 1.6 2000/07/19 15:25:13 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
@@ -190,7 +190,7 @@ getcwd(pt, size)
* Check for length of the current name, preceding slash,
* leading slash.
*/
- if (bpt - pt <= dp->d_namlen + (first ? 1 : 2)) {
+ if (bpt - pt < dp->d_namlen + (first ? 1 : 2)) {
size_t len, off;
char *npt;
diff --git a/lib/libc/gen/vis.c b/lib/libc/gen/vis.c
index 0859957bde7..1c8028fb9b6 100644
--- a/lib/libc/gen/vis.c
+++ b/lib/libc/gen/vis.c
@@ -32,7 +32,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: vis.c,v 1.4 1997/07/25 20:30:05 mickey Exp $";
+static char rcsid[] = "$OpenBSD: vis.c,v 1.5 2000/07/19 15:25:13 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@@ -51,7 +51,8 @@ vis(dst, c, flag, nextc)
int c, nextc;
register int flag;
{
- if (((u_int)c <= UCHAR_MAX && isascii(c) && isgraph(c)) ||
+ if (((u_int)c <= UCHAR_MAX && isascii((u_char)c) &&
+ isgraph((u_char)c)) ||
((flag & VIS_SP) == 0 && c == ' ') ||
((flag & VIS_TAB) == 0 && c == '\t') ||
((flag & VIS_NL) == 0 && c == '\n') ||