svn commit: r261502 - head/lib/libc/net
Eitan Adler
eadler at FreeBSD.org
Wed Feb 5 02:00:31 UTC 2014
Author: eadler
Date: Wed Feb 5 02:00:31 2014
New Revision: 261502
URL: http://svnweb.freebsd.org/changeset/base/261502
Log:
libc/net: fix a portability issue
* POSIX does not require socklen_t to be unsigned
Submitted by: bde
MFC After: 1 week (with r261454)
Modified:
head/lib/libc/net/ip6opt.c
Modified: head/lib/libc/net/ip6opt.c
==============================================================================
--- head/lib/libc/net/ip6opt.c Wed Feb 5 00:26:11 2014 (r261501)
+++ head/lib/libc/net/ip6opt.c Wed Feb 5 02:00:31 2014 (r261502)
@@ -382,7 +382,7 @@ inet6_opt_init(void *extbuf, socklen_t e
struct ip6_ext *ext = (struct ip6_ext *)extbuf;
if (ext) {
- if (extlen == 0 || (extlen % 8))
+ if (extlen <= 0 || (extlen % 8))
return(-1);
ext->ip6e_len = (extlen >> 3) - 1;
}
More information about the svn-src-all
mailing list