summaryrefslogtreecommitdiff
path: root/lib/libc/string
diff options
context:
space:
mode:
authorwiz <wiz@NetBSD.org>2001-01-26 10:53:30 +0000
committerwiz <wiz@NetBSD.org>2001-01-26 10:53:30 +0000
commit35fa1be31ce69b8f6fb3f044e018c61b2e87be6e (patch)
tree9503b44f5a4a73c86c00200b811eb28da9d0d0d6 /lib/libc/string
parenta85be0a99cadb95cd3ba30fb83aa166ec82bead4 (diff)
ANSIfy and de-lint. Reviewed by christos.
Diffstat (limited to 'lib/libc/string')
-rw-r--r--lib/libc/string/swab.c18
1 files changed, 8 insertions, 10 deletions
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 <unistd.h>
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 */