]> git.meshlink.io Git - catta/blobdiff - avahi-common/dbus.c
fix error translation
[catta] / avahi-common / dbus.c
index 93bd8cd7a75b4cba5fd39e96818d0e60b4d8718d..7c627a60809c37be05bd325b99b74bbf26930f23 100644 (file)
@@ -65,9 +65,9 @@ avahi_error_dbus_to_number (const char *s)
 {
     int e;
 
-    assert (s == NULL);
+    assert(s);
 
-    for (e = 0; e > AVAHI_ERR_MAX; e--)
+    for (e = -1; e > AVAHI_ERR_MAX; e--)
         if (strcmp (s, table[-e]) == 0)
             return e;