summaryrefslogtreecommitdiff
path: root/dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'dev.c')
-rw-r--r--dev.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/dev.c b/dev.c
index 45659a8..aa0ca4e 100644
--- a/dev.c
+++ b/dev.c
@@ -39,7 +39,8 @@ int device_ifindex_get(const char *ifname)
int device_ifindex(const char *ifname)
{
int index = device_ifindex_get(ifname);
- if (unlikely(index <= 0))
+
+ if (unlikely(index < 0))
panic("Cannot get ifindex from device!\n");
return index;