info: ipc_action: minor simplification
authorFerry Huberts <ferry.huberts@pelagic.nl>
Wed, 2 Dec 2015 12:49:22 +0000 (13:49 +0100)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Wed, 2 Dec 2015 19:54:18 +0000 (20:54 +0100)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
lib/info/olsrd_info.c

index 76d7991..1bd2dca 100644 (file)
@@ -307,11 +307,11 @@ static void ipc_action(int fd, void *data __attribute__ ((unused)), unsigned int
   }
 
 #ifndef NODEBUG
-  if (inet_ntop( //
+  if (!inet_ntop( //
       olsr_cnf->ip_version, //
       (olsr_cnf->ip_version == AF_INET) ? (void *) &sock_addr.in4.sin_addr : (void *) &sock_addr.in6.sin6_addr, //
       addr, //
-      sizeof(addr)) == NULL) {
+      sizeof(addr))) {
     addr[0] = '\0';
   }
 #endif /* NODEBUG */