From: Roy Marples Date: Wed, 18 Jul 2007 11:38:42 +0000 (+0000) Subject: ==-1 is cheaper than <0 X-Git-Tag: v3.2.3~234 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ed25b07f3657a4d2b2ed1ea19b986c58f013f526;p=thirdparty%2Fdhcpcd.git ==-1 is cheaper than <0 --- diff --git a/interface.c b/interface.c index 194a1408..24a9ab08 100644 --- a/interface.c +++ b/interface.c @@ -239,7 +239,7 @@ interface_t *read_interface (const char *ifname, int metric) /* Do something with the metric parameter to satisfy the compiler warning */ metric = 0; strlcpy (ifr.ifr_name, ifname, sizeof (ifr.ifr_name)); - if (ioctl (s, SIOCGIFHWADDR, &ifr) <0) { + if (ioctl (s, SIOCGIFHWADDR, &ifr) == -1) { logger (LOG_ERR, "ioctl SIOCGIFHWADDR: %s", strerror (errno)); close (s); return NULL;