jsoninfo: remove pointless compare
authorFerry Huberts <ferry.huberts@pelagic.nl>
Tue, 23 Oct 2012 09:35:11 +0000 (11:35 +0200)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Tue, 23 Oct 2012 11:45:14 +0000 (13:45 +0200)
Coverity:
CID 739666 (#1 of 1): Array compared against 0 (NO_EFFECT)
  Comparing an array to null is not useful: "linkpath != NULL".

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
lib/jsoninfo/src/olsrd_jsoninfo.c

index 3c3300c..68f9be1 100644 (file)
@@ -1129,7 +1129,7 @@ ipc_print_interfaces(struct autobuf *abuf)
 #ifdef __linux__
     snprintf(path, PATH_MAX, "/sys/class/net/%s/device/driver/module", ifs->name);
     linklen = readlink(path, linkpath, PATH_MAX - 1);
-    if (linkpath != NULL && linklen > 1) {
+    if (linklen > 1) {
       linkpath[linklen] = '\0';
       abuf_json_string(abuf, "kernelModule", basename(linkpath));
     }