]> git.saurik.com Git - apple/libc.git/blob - string/FreeBSD/swab.c.patch
Libc-391.2.10.tar.gz
[apple/libc.git] / string / FreeBSD / swab.c.patch
1 --- swab.c.orig 2004-08-03 14:33:13.000000000 -0700
2 +++ swab.c 2004-08-03 15:05:03.000000000 -0700
3 @@ -43,12 +43,14 @@
4 #include <string.h>
5
6 void
7 -swab(const void * __restrict from, void * __restrict to, size_t len)
8 +swab(const void * __restrict from, void * __restrict to, ssize_t len)
9 {
10 unsigned long temp;
11 int n;
12 char *fp, *tp;
13
14 + if (len <= 0)
15 + return;
16 n = len >> 1;
17 fp = (char *)from;
18 tp = (char *)to;