jsoninfo: minor simplification in /2hop
authorFerry Huberts <ferry.huberts@pelagic.nl>
Thu, 17 Mar 2016 17:59:50 +0000 (18:59 +0100)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Thu, 17 Mar 2016 17:59:57 +0000 (18:59 +0100)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
lib/jsoninfo/src/olsrd_jsoninfo.c

index 59e12e5..964ae5f 100644 (file)
@@ -428,7 +428,7 @@ static void ipc_print_neighbors_internal(struct autobuf *abuf, bool list_2hop) {
     thop_cnt = 0;
     for (list_2 = neigh->neighbor_2_list.next; list_2 != &neigh->neighbor_2_list; list_2 = list_2->next) {
       if (list_2hop && list_2->neighbor_2) {
-        abuf_json_ip_address(abuf, NULL, list_2->neighbor_2 ? &list_2->neighbor_2->neighbor_2_addr : NULL);
+        abuf_json_ip_address(abuf, NULL, &list_2->neighbor_2->neighbor_2_addr);
       }
       thop_cnt++;
     }