Fix ssid test.
authorRoy Marples <roy@marples.name>
Mon, 20 Apr 2009 21:21:44 +0000 (21:21 +0000)
committerRoy Marples <roy@marples.name>
Mon, 20 Apr 2009 21:21:44 +0000 (21:21 +0000)
src/libdhcpcd/misc.c

index 7d3d9c07ac6f9ca400ae7d7ff7c49209d088c51d..d3f700938798a0b2029e240de24fef72c7577ff4 100644 (file)
@@ -97,14 +97,14 @@ dhcpcd_if_message(const DHCPCD_IF *i)
        else if (strcmp(i->reason, "CARRIER") == 0) {
                if (i->wireless) {
                        reason = _("Associated with");
-                       if (i->ssid != NULL)
+                       if (*i->ssid != '\0')
                                showssid = true;
                } else
                        reason = _("Cable plugged in");
                showip = false;
        } else if (strcmp(i->reason, "NOCARRIER") == 0) {
                if (i->wireless) {
-                       if (i->ssid != NULL || i->ip.s_addr != 0) {
+                       if (*i->ssid != '\0' || i->ip.s_addr != 0) {
                                reason = _("Disassociated from");
                                showssid = true;
                        } else