]> git.sur5r.net Git - i3/i3/commitdiff
Use "*buffer == '\0'" instead of "strlen(buffer) == 0" (thanks dothebart)
authorAxel Wagner <mail@merovius.de>
Sat, 1 Jan 2011 14:07:28 +0000 (15:07 +0100)
committerAxel Wagner <mail@merovius.de>
Sat, 1 Jan 2011 14:07:28 +0000 (15:07 +0100)
i3bar/src/child.c

index 3092d527056d081371c48a9c4d78f7997f13c114..0209e4cbe4e9865b1e3e046cc2202c877e71aae3 100644 (file)
@@ -74,7 +74,7 @@ void stdin_io_cb(struct ev_loop *loop, ev_io *watcher, int revents) {
         }
         rec += n;
     }
-    if (strlen(buffer) == 0) {
+    if (*buffer == '\0') {
         FREE(buffer);
         return;
     }