From fe7bbe3c3bf529f35488281aa8cb0ed03a308a6d Mon Sep 17 00:00:00 2001 From: millert <> Date: Thu, 27 Apr 2017 23:52:35 +0000 Subject: Remove "len < 0" check; len is socklen_t (uint32_t) so can't be negative. Quiets a warning from clang. OK bluhm@ --- src/lib/libc/net/ip6opt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/lib/libc/net/ip6opt.c b/src/lib/libc/net/ip6opt.c index 71dfe55803..d6406c3aed 100644 --- a/src/lib/libc/net/ip6opt.c +++ b/src/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); /* -- cgit v1.2.3-55-g6feb