]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
==-1 is cheaper than <0
authorRoy Marples <roy@marples.name>
Wed, 18 Jul 2007 11:38:42 +0000 (11:38 +0000)
committerRoy Marples <roy@marples.name>
Wed, 18 Jul 2007 11:38:42 +0000 (11:38 +0000)
interface.c

index 194a140854193204243c0fe4077fe308f8fda70a..24a9ab080092c9f69cc5926b27dffe3a72bf8b24 100644 (file)
@@ -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;