txtinfo: simplify some comparisons
authorFerry Huberts <ferry.huberts@pelagic.nl>
Thu, 26 Nov 2015 14:07:48 +0000 (15:07 +0100)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Fri, 27 Nov 2015 09:17:21 +0000 (10:17 +0100)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
lib/txtinfo/src/olsrd_txtinfo.c

index 202d013..df9be77 100644 (file)
@@ -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);
   }
 }