summaryrefslogtreecommitdiff
path: root/wmiistatus.c
diff options
context:
space:
mode:
authorMichael Stapelberg <michael+x200@stapelberg.de>2008-12-10 11:11:31 +0100
committerMichael Stapelberg <michael+x200@stapelberg.de>2008-12-10 11:11:31 +0100
commit513cfe8f1bb892eda973221477ce385f2ca4aca8 (patch)
tree74b6d60e5c80c64f70b2b12d973b6dc33e004b32 /wmiistatus.c
parent9388ee56e183ccb0210f6ee03bdb2f4ee9f3ebcf (diff)
Don't show eth-speed if it was never set
Diffstat (limited to 'wmiistatus.c')
-rw-r--r--wmiistatus.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/wmiistatus.c b/wmiistatus.c
index 6604533..10b1b33 100644
--- a/wmiistatus.c
+++ b/wmiistatus.c
@@ -367,7 +367,7 @@ static char *get_eth_info() {
ifr.ifr_data = (caddr_t)&ecmd;
(void)strcpy(ifr.ifr_name, eth_interface);
if ((err = ioctl(fd, SIOCETHTOOL, &ifr)) == 0)
- ethspeed = ecmd.speed;
+ ethspeed = (ecmd.speed == 65535 ? 0 : ecmd.speed);
else write_error_to_statusbar("Could not get interface speed. Insufficient privileges?");
(void)close(fd);