From 0e9fde88777c9a414bbff67616be27393962c078 Mon Sep 17 00:00:00 2001 From: naddy Date: Wed, 7 Jun 2017 16:47:29 +0000 Subject: [PATCH] Fix clang warning about tautological compare: an unsigned long can't be negative. ok deraadt@ --- sbin/ifconfig/brconfig.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sbin/ifconfig/brconfig.c b/sbin/ifconfig/brconfig.c index 46d5e67f37d..12ed5e7e99e 100644 --- a/sbin/ifconfig/brconfig.c +++ b/sbin/ifconfig/brconfig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: brconfig.c,v 1.14 2016/11/28 10:12:50 reyk Exp $ */ +/* $OpenBSD: brconfig.c,v 1.15 2017/06/07 16:47:29 naddy Exp $ */ /* * Copyright (c) 1999, 2000 Jason L. Wright (jason@thought.net) @@ -581,8 +581,7 @@ bridge_ifcost(const char *ifname, const char *val) errno = 0; v = strtoul(val, &endptr, 0); - if (val[0] == '\0' || endptr[0] != '\0' || - v < 0 || v > 0xffffffffUL || + if (val[0] == '\0' || endptr[0] != '\0' || v > 0xffffffffUL || (errno == ERANGE && v == ULONG_MAX)) errx(1, "invalid arg for ifcost: %s", val); -- 2.20.1