summaryrefslogtreecommitdiff
path: root/ifconfig.c
diff options
context:
space:
mode:
authorBernd Eckenfels <net-tools@lina.inka.de>2001-02-19 21:42:43 +0000
committerBernd Eckenfels <net-tools@lina.inka.de>2001-02-19 21:42:43 +0000
commit85d64cda0795e307e154d76053b4dece4be49bbd (patch)
treef2e47e97c0ae37edb8ed2a1f36c808238b651571 /ifconfig.c
parent3eee4d430c7b3665dae29c7279a49973428079d7 (diff)
downloadnet-tools-85d64cda0795e307e154d76053b4dece4be49bbd.tar.gz
net-tools-85d64cda0795e307e154d76053b4dece4be49bbd.tar.bz2
net-tools-85d64cda0795e307e154d76053b4dece4be49bbd.zip
Adam Richter pointed out, that 0 is a valid fd value, even if it is unlikely
to be the case in this situation.
Diffstat (limited to 'ifconfig.c')
-rw-r--r--ifconfig.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ifconfig.c b/ifconfig.c
index 74b9e9c..16b3f23 100644
--- a/ifconfig.c
+++ b/ifconfig.c
@@ -3,7 +3,7 @@
* that either displays or sets the characteristics of
* one or more of the system's networking interfaces.
*
- * Version: $Id: ifconfig.c,v 1.44 2001/02/12 21:06:47 pb Exp $
+ * Version: $Id: ifconfig.c,v 1.45 2001/02/19 21:42:43 ecki Exp $
*
* Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
* and others. Copyright 1993 MicroWalt Corporation
@@ -318,7 +318,7 @@ int main(int argc, char **argv)
perror("family socket");
exit(1);
} else {
- if (skfd > 0 && skfd != fd) close(skfd);
+ if (skfd >= 0 && skfd != fd) close(skfd);
skfd = fd;
}
}