diff options
author | 2015-03-18 15:12:36 +0000 | |
---|---|---|
committer | 2015-03-18 15:12:36 +0000 | |
commit | 2d0c391719daaa3056e0db08e4dec6b347e32d12 (patch) | |
tree | f8e6140aa4bf5141bf06dc3d6223379b1229c22c | |
parent | use 4x buffer size for opendir. speeds up large directory reading, and (diff) | |
download | wireguard-openbsd-2d0c391719daaa3056e0db08e4dec6b347e32d12.tar.xz wireguard-openbsd-2d0c391719daaa3056e0db08e4dec6b347e32d12.zip |
not necessary to work around an apparent bug on ancient freebsd
-rw-r--r-- | bin/ksh/misc.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/bin/ksh/misc.c b/bin/ksh/misc.c index 90da37d0426..c5c7f989eff 100644 --- a/bin/ksh/misc.c +++ b/bin/ksh/misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: misc.c,v 1.39 2015/01/16 06:39:32 deraadt Exp $ */ +/* $OpenBSD: misc.c,v 1.40 2015/03/18 15:12:36 tedu Exp $ */ /* * Miscellaneous functions @@ -1053,10 +1053,7 @@ strip_nuls(char *buf, int nbytes) { char *dst; - /* nbytes check because some systems (older freebsd's) have a buggy - * memchr() - */ - if (nbytes && (dst = memchr(buf, '\0', nbytes))) { + if ((dst = memchr(buf, '\0', nbytes))) { char *end = buf + nbytes; char *p, *q; |