From 35fa1be31ce69b8f6fb3f044e018c61b2e87be6e Mon Sep 17 00:00:00 2001 From: wiz Date: Fri, 26 Jan 2001 10:53:30 +0000 Subject: ANSIfy and de-lint. Reviewed by christos. --- lib/libc/string/swab.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'lib/libc/string') diff --git a/lib/libc/string/swab.c b/lib/libc/string/swab.c index bb20f735c37..f70131eefa1 100644 --- a/lib/libc/string/swab.c +++ b/lib/libc/string/swab.c @@ -1,4 +1,4 @@ -/* $NetBSD: swab.c,v 1.9 1999/09/20 04:39:49 lukem Exp $ */ +/* $NetBSD: swab.c,v 1.10 2001/01/26 10:53:30 wiz Exp $ */ /* * Copyright (c) 1988, 1993 @@ -41,7 +41,7 @@ #if 0 static char sccsid[] = "@(#)swab.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: swab.c,v 1.9 1999/09/20 04:39:49 lukem Exp $"); +__RCSID("$NetBSD: swab.c,v 1.10 2001/01/26 10:53:30 wiz Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -49,20 +49,18 @@ __RCSID("$NetBSD: swab.c,v 1.9 1999/09/20 04:39:49 lukem Exp $"); #include void -swab(from, to, len) - const void *from; - void *to; - size_t len; +swab(const void *from, void *to, size_t len) { - unsigned long temp; - int n; - char *fp, *tp; + char temp; + size_t n; + const char *fp; + char *tp; _DIAGASSERT(from != NULL); _DIAGASSERT(to != NULL); n = (len >> 1) + 1; - fp = (char *)from; + fp = (const char *)from; tp = (char *)to; #define STEP temp = *fp++,*tp++ = *fp++,*tp++ = temp /* round to multiple of 8 */ -- cgit