libiproute: fix buggy open check: s/if (fd)/if (fd >= 0)/

less: small optimization -15 bytes
This commit is contained in:
Denis Vlasenko
2008-12-10 14:14:09 +00:00
parent 311c19a661
commit 12abcb36c8
2 changed files with 2 additions and 4 deletions

View File

@ -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;