summaryrefslogtreecommitdiff
path: root/bin/ksh/history.c
diff options
context:
space:
mode:
authorJason Peel <jsyn@cvs.openbsd.org>2003-05-16 19:58:58 +0000
committerJason Peel <jsyn@cvs.openbsd.org>2003-05-16 19:58:58 +0000
commit0c8e19979914f90d1a676593fede33d73978a3be (patch)
tree51c619d68305dec886a88709605f3c88309e39d4 /bin/ksh/history.c
parentaf98e47ac496ec0d5f53f22a08c6ed052b86265e (diff)
fix several constant overflows, remove the strerror prototype (shouldn't be
there), and cleanup some whitespace; help from, and okay millert@
Diffstat (limited to 'bin/ksh/history.c')
-rw-r--r--bin/ksh/history.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/ksh/history.c b/bin/ksh/history.c
index 2571f70b6ce..3d9aecb02e0 100644
--- a/bin/ksh/history.c
+++ b/bin/ksh/history.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: history.c,v 1.19 2003/04/15 08:35:34 deraadt Exp $ */
+/* $OpenBSD: history.c,v 1.20 2003/05/16 19:58:57 jsyn Exp $ */
/*
* command history
@@ -1096,7 +1096,7 @@ writehistfile(lno, cmd)
unsigned char *base;
unsigned char *new;
int bytes;
- char hdr[5];
+ unsigned char hdr[5];
(void) flock(histfd, LOCK_EX);
sizenow = lseek(histfd, 0L, SEEK_END);
@@ -1160,7 +1160,7 @@ static int
sprinkle(fd)
int fd;
{
- static char mag[] = { HMAGIC1, HMAGIC2 };
+ static unsigned char mag[] = { HMAGIC1, HMAGIC2 };
return(write(fd, mag, 2) != 2);
}