summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpdw <>2011-10-04 20:40:34 +0000
committerpdw <>2011-10-04 20:40:34 +0000
commitaf3ed6ff48f5cb6a13f78027ed83fe5ed1618126 (patch)
tree589db3cd7a2a546f706977ebaff56131ba83f7c2
parent09f3d33527cb976f9a8c8a918e48178c84bad33e (diff)
downloadiftop-af3ed6ff48f5cb6a13f78027ed83fe5ed1618126.zip
Fixed typo in changelog, and error in application of i/f autodetection patch.
-rw-r--r--ChangeLog2
-rw-r--r--options.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 1cfda0d..d4e87b8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -49,7 +49,7 @@ Unattributed items are by Paul Warren and Chris Lightfoot.
* Attempt to detect if interface is actually up when doing autodetection.
* Fixed segfault when selecting interfaces with empty MAC address (e.g. gprs
interface on Nokia N900)
- Graham Ings <graham@nerve.org.za>
+ Graham Inggs <graham@nerve.org.za>
* Avoid autodetecting wmaster interfaces
* Experimental support for IEEE802_11 radiotap interfaces (DLT 127)
diff --git a/options.c b/options.c
index 0362ba7..ced4125 100644
--- a/options.c
+++ b/options.c
@@ -103,7 +103,7 @@ static char *get_first_interface(void) {
while(nameindex[j].if_index != 0) {
if (strcmp(nameindex[j].if_name, "lo") != 0 && !is_bad_interface_name(nameindex[j].if_name)) {
strncpy(ifr.ifr_name, nameindex[j].if_name, sizeof(ifr.ifr_name));
- if ((s == -1) || (ioctl(s, SIOCGIFFLAGS, &ifr) != -1) || (ifr.ifr_flags & IFF_UP)) {
+ if ((s == -1) || (ioctl(s, SIOCGIFFLAGS, &ifr) == -1) || (ifr.ifr_flags & IFF_UP)) {
i = xstrdup(nameindex[j].if_name);
break;
}