diff options
author | eadler <eadler@FreeBSD.org> | 2014-02-05 02:00:31 +0000 |
---|---|---|
committer | eadler <eadler@FreeBSD.org> | 2014-02-05 02:00:31 +0000 |
commit | 693a7c1ac21dbbd28b9932d38ced8f3cab8daa91 (patch) | |
tree | 2064d28c642d6d091478e4ce386da8afdc09c804 /lib/libc | |
parent | 11e536cc2db21240c11ed703049bd38778a6a087 (diff) | |
download | FreeBSD-src-693a7c1ac21dbbd28b9932d38ced8f3cab8daa91.zip FreeBSD-src-693a7c1ac21dbbd28b9932d38ced8f3cab8daa91.tar.gz |
libc/net: fix a portability issue
* POSIX does not require socklen_t to be unsigned
Submitted by: bde
MFC After: 1 week (with r261454)
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/net/ip6opt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/net/ip6opt.c b/lib/libc/net/ip6opt.c index b046e73..e39808c 100644 --- a/lib/libc/net/ip6opt.c +++ b/lib/libc/net/ip6opt.c @@ -382,7 +382,7 @@ inet6_opt_init(void *extbuf, socklen_t extlen) 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; } |