[Olsr-dev] [PATCH v1 084/115] info: ipc_action: minor simplification

Ferry Huberts (spam-protected)
Wed Dec 2 21:28:57 CET 2015


From: Ferry Huberts <(spam-protected)>

Signed-off-by: Ferry Huberts <(spam-protected)>
---
 lib/info/olsrd_info.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/info/olsrd_info.c b/lib/info/olsrd_info.c
index 76d7991..1bd2dca 100644
--- a/lib/info/olsrd_info.c
+++ b/lib/info/olsrd_info.c
@@ -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 */
-- 
2.5.0




More information about the Olsr-dev mailing list