From 12abcb36c871f4c97d7aed3d9bd55e5477888bb7 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Wed, 10 Dec 2008 14:14:09 +0000 Subject: libiproute: fix buggy open check: s/if (fd)/if (fd >= 0)/ less: small optimization -15 bytes --- networking/libiproute/ll_map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'networking') diff --git a/networking/libiproute/ll_map.c b/networking/libiproute/ll_map.c index 3412dc7..2ed7fbb 100644 --- a/networking/libiproute/ll_map.c +++ b/networking/libiproute/ll_map.c @@ -172,7 +172,7 @@ int xll_name_to_index(const char *const name) #endif sock_fd = socket(AF_INET, SOCK_DGRAM, 0); - if (sock_fd) { + if (sock_fd >= 0) { struct ifreq ifr; int tmp; -- cgit v1.1