[Olsr-dev] [PATCH v1 17/44] txtinfo: simplify some comparisons

Ferry Huberts (spam-protected)
Fri Nov 27 10:43:10 CET 2015


From: Ferry Huberts <(spam-protected)>

Signed-off-by: Ferry Huberts <(spam-protected)>
---
 lib/txtinfo/src/olsrd_txtinfo.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/txtinfo/src/olsrd_txtinfo.c b/lib/txtinfo/src/olsrd_txtinfo.c
index 202d013..df9be77 100644
--- a/lib/txtinfo/src/olsrd_txtinfo.c
+++ b/lib/txtinfo/src/olsrd_txtinfo.c
@@ -321,6 +321,7 @@ static void ipc_action(int fd, void *data __attribute__ ((unused)), unsigned int
       while (recv(ipc_connection, (void *) &dummy, sizeof(dummy), 0) == sizeof(dummy))
         ;
     }
+
     if (0 < s) {
       requ[s] = 0;
       /* To print out neighbours only on the Freifunk Status
@@ -363,7 +364,7 @@ static void ipc_action(int fd, void *data __attribute__ ((unused)), unsigned int
       }
     }
 
-    if (send_what == 0)
+    if (!send_what)
       send_what = SIW_ALL;
   }
 
@@ -802,7 +803,7 @@ static void info_write_data(void *foo __attribute__ ((unused))) {
       }
     }
   }
-  if (outbuffer_count == 0) {
+  if (!outbuffer_count) {
     olsr_stop_timer(writetimer_entry);
   }
 }
-- 
2.5.0




More information about the Olsr-dev mailing list