From 070eb30ca675029e79f93333b60287527efc0906 Mon Sep 17 00:00:00 2001 From: bde Date: Sat, 31 Aug 1996 16:52:44 +0000 Subject: Fixed the easy cases of const poisoning in the kernel. Cosmetic. --- sys/libkern/strcmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/libkern/strcmp.c') diff --git a/sys/libkern/strcmp.c b/sys/libkern/strcmp.c index c9c397b..48e5635 100644 --- a/sys/libkern/strcmp.c +++ b/sys/libkern/strcmp.c @@ -33,7 +33,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: strcmp.c,v 1.2 1994/08/02 07:44:33 davidg Exp $ */ #include @@ -49,5 +49,5 @@ strcmp(s1, s2) while (*s1 == *s2++) if (*s1++ == 0) return (0); - return (*(unsigned char *)s1 - *(unsigned char *)--s2); + return (*(const unsigned char *)s1 - *(const unsigned char *)(s2 - 1)); } -- cgit v1.1