]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
Fix some compiler warnings
authorVincent Bernat <vbernat@wanadooportails.com>
Mon, 17 Nov 2008 08:40:56 +0000 (09:40 +0100)
committerVincent Bernat <vbernat@wanadooportails.com>
Mon, 17 Nov 2008 08:40:56 +0000 (09:40 +0100)
src/agent_priv.c
src/edp.c

index c055d341dec26a2c1dc54c2c841243c082a94ca5..90140b9b07ac1db098829a719da49bdbfb5a8be3 100644 (file)
@@ -21,6 +21,7 @@
 
 #include "lldpd.h"
 
+#include <unistd.h>
 #include <errno.h>
 
 #include <net-snmp/net-snmp-config.h>
index ffd317abcfe9e10dbdbd8039610828dbf6eca892..f13ed2abde608fb9c237111844df843f1d97ee50 100644 (file)
--- a/src/edp.c
+++ b/src/edp.c
@@ -110,7 +110,7 @@ edp_send(struct lldpd *global, struct lldpd_chassis *chassis,
                                        break;
                                }
                        }
-                       if (info.port == -1) {
+                       if (deviceslot[i] == NULL) {
                                info.slot = htons(8);
                                info.port = htons(if_nametoindex(hardware->h_ifname));
                        }