summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--avahi-common/address.h2
-rw-r--r--avahi-core/iface.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/avahi-common/address.h b/avahi-common/address.h
index 7f10a55..b8706ee 100644
--- a/avahi-common/address.h
+++ b/avahi-common/address.h
@@ -53,7 +53,7 @@ enum {
#define AVAHI_ADDRESS_STR_MAX 40 /* IPv6 Max = 4*8 + 7 + 1 for NUL */
/** Return TRUE if the specified interface index is valid */
-#define AVAHI_IF_VALID(ifindex) (((ifindex) > 0) || ((ifindex) == AVAHI_PROTO_UNSPEC))
+#define AVAHI_IF_VALID(ifindex) (((ifindex) >= 0) || ((ifindex) == AVAHI_IF_UNSPEC))
/** Return TRUE if the specified protocol is valid */
#define AVAHI_PROTO_VALID(protocol) (((protocol) == AVAHI_PROTO_INET) || ((protocol) == AVAHI_PROTO_INET6) || ((protocol) == AVAHI_PROTO_UNSPEC))
diff --git a/avahi-core/iface.c b/avahi-core/iface.c
index 9fc8cb3..f90a61a 100644
--- a/avahi-core/iface.c
+++ b/avahi-core/iface.c
@@ -539,7 +539,7 @@ AvahiInterface* avahi_interface_monitor_get_interface(AvahiInterfaceMonitor *m,
AvahiHwInterface* avahi_interface_monitor_get_hw_interface(AvahiInterfaceMonitor *m, AvahiIfIndex idx) {
assert(m);
- assert(idx > 0);
+ assert(idx >= 0);
return avahi_hashmap_lookup(m->hashmap, &idx);
}