summaryrefslogtreecommitdiff
path: root/sys/lib
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1996-12-08 14:25:53 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1996-12-08 14:25:53 +0000
commitb6f29caaba4aaeb972675d67ca7c434a5e9b73a7 (patch)
tree5ef85dc039e10e57fb15b250c4ce10f81084cfa6 /sys/lib
parent52aa3799b1532a9cd3e62ab778110510fca51689 (diff)
-Wcast-qual happiness
Diffstat (limited to 'sys/lib')
-rw-r--r--sys/lib/libkern/bcmp.c10
-rw-r--r--sys/lib/libkern/strcmp.c4
-rw-r--r--sys/lib/libkern/strncmp.c4
3 files changed, 9 insertions, 9 deletions
diff --git a/sys/lib/libkern/bcmp.c b/sys/lib/libkern/bcmp.c
index 53b867e557b..68aff5a5ed8 100644
--- a/sys/lib/libkern/bcmp.c
+++ b/sys/lib/libkern/bcmp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bcmp.c,v 1.3 1996/05/01 15:18:45 deraadt Exp $ */
+/* $OpenBSD: bcmp.c,v 1.4 1996/12/08 14:25:49 niklas Exp $ */
/*
* Copyright (c) 1987 Regents of the University of California.
@@ -35,7 +35,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)bcmp.c 5.6 (Berkeley) 2/24/91";*/
-static char *rcsid = "$OpenBSD: bcmp.c,v 1.3 1996/05/01 15:18:45 deraadt Exp $";
+static char *rcsid = "$OpenBSD: bcmp.c,v 1.4 1996/12/08 14:25:49 niklas Exp $";
#endif /* LIBC_SCCS and not lint */
#ifndef _KERNEL
@@ -52,12 +52,12 @@ bcmp(b1, b2, length)
const void *b1, *b2;
register size_t length;
{
- register char *p1, *p2;
+ register const char *p1, *p2;
if (length == 0)
return(0);
- p1 = (char *)b1;
- p2 = (char *)b2;
+ p1 = (const char *)b1;
+ p2 = (const char *)b2;
do
if (*p1++ != *p2++)
break;
diff --git a/sys/lib/libkern/strcmp.c b/sys/lib/libkern/strcmp.c
index 9dd06cb389e..78449ab0a32 100644
--- a/sys/lib/libkern/strcmp.c
+++ b/sys/lib/libkern/strcmp.c
@@ -36,7 +36,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)strcmp.c 5.5 (Berkeley) 1/26/91";*/
-static char *rcsid = "$Id: strcmp.c,v 1.2 1996/05/01 15:18:49 deraadt Exp $";
+static char *rcsid = "$Id: strcmp.c,v 1.3 1996/12/08 14:25:49 niklas Exp $";
#endif /* LIBC_SCCS and not lint */
#ifndef _KERNEL
@@ -55,5 +55,5 @@ strcmp(s1, s2)
while (*s1 == *s2++)
if (*s1++ == 0)
return (0);
- return (*(unsigned char *)s1 - *(unsigned char *)--s2);
+ return (*(const u_char *)s1 - *(const u_char *)--s2);
}
diff --git a/sys/lib/libkern/strncmp.c b/sys/lib/libkern/strncmp.c
index 0a88e080488..60756ccc4d7 100644
--- a/sys/lib/libkern/strncmp.c
+++ b/sys/lib/libkern/strncmp.c
@@ -33,7 +33,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
/*static char *sccsid = "from: @(#)strncmp.c 5.6 (Berkeley) 1/26/91";*/
-static char *rcsid = "$Id: strncmp.c,v 1.2 1996/05/01 15:18:52 deraadt Exp $";
+static char *rcsid = "$Id: strncmp.c,v 1.3 1996/12/08 14:25:49 niklas Exp $";
#endif /* LIBC_SCCS and not lint */
#ifndef _KERNEL
@@ -52,7 +52,7 @@ strncmp(s1, s2, n)
return (0);
do {
if (*s1 != *s2++)
- return (*(unsigned char *)s1 - *(unsigned char *)--s2);
+ return (*(const u_char *)s1 - *(const u_char *)--s2);
if (*s1++ == 0)
break;
} while (--n != 0);