summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoian Bonev <bbonev@ipacct.com>2011-11-07 10:22:19 +0530
committerBoian Bonev <bbonev@ipacct.com>2011-11-07 10:22:19 +0530
commit00fc2f34ee4fd77310e1ed4d1ddacccdb20c473d (patch)
tree87f0ff5be2d40ab139cb742c4830db1e47183f1e
parentb7543bdfda84c0287dd0d183fa764c9931a4c211 (diff)
downloadMAC-Telnet-00fc2f34ee4fd77310e1ed4d1ddacccdb20c473d.tar.gz
MAC-Telnet-00fc2f34ee4fd77310e1ed4d1ddacccdb20c473d.zip
fix error handling because get_device_mac return -1 for error, not 0
-rw-r--r--devices.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/devices.c b/devices.c
index 58c8054..00bf59d 100644
--- a/devices.c
+++ b/devices.c
@@ -128,7 +128,7 @@ int get_macs(int sockfd, char *name, int name_len, unsigned char *mac) {
strncpy(name, int_cursor->ifa_name, name_len - 1);
name[name_len - 1] = '\0';
int_cursor = int_cursor->ifa_next;
- if (get_device_mac(sockfd, name, mac)) {
+ if (get_device_mac(sockfd, name, mac)!=-1) {
return 1;
}
}