]> git.saurik.com Git - apple/libc.git/blobdiff - string/FreeBSD/swab.c
Libc-1082.20.4.tar.gz
[apple/libc.git] / string / FreeBSD / swab.c
index fae6e563230e7179caea7193a373af6da8ad686a..1d55327c35c55da03e12d292615dc7b8a8234797 100644 (file)
@@ -45,6 +45,8 @@ swab(const void * __restrict from, void * __restrict to, ssize_t len)
        int n;
        char *fp, *tp;
 
+       if (len <= 0)
+               return;
        n = len >> 1;
        fp = (char *)from;
        tp = (char *)to;