From: millert Date: Thu, 27 Apr 2017 23:52:35 +0000 (+0000) Subject: Remove "len < 0" check; len is socklen_t (uint32_t) so can't be X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=ad5027344c1125e127d2d91c0445c3e44f70ecc8;p=openbsd Remove "len < 0" check; len is socklen_t (uint32_t) so can't be negative. Quiets a warning from clang. OK bluhm@ --- diff --git a/lib/libc/net/ip6opt.c b/lib/libc/net/ip6opt.c index 71dfe558031..d6406c3aedd 100644 --- a/lib/libc/net/ip6opt.c +++ b/lib/libc/net/ip6opt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip6opt.c,v 1.8 2015/01/16 16:48:51 deraadt Exp $ */ +/* $OpenBSD: ip6opt.c,v 1.9 2017/04/27 23:52:35 millert Exp $ */ /* $KAME: ip6opt.c,v 1.18 2005/06/15 07:11:35 keiichi Exp $ */ /* @@ -105,7 +105,7 @@ inet6_opt_append(void *extbuf, socklen_t extlen, int offset, u_int8_t type, * The option data length must have a value between 0 and 255, * inclusive, and is the length of the option data that follows. */ - if (len < 0 || len > 255) + if (len > 255) return (-1); /*