Use "*buffer == '\0'" instead of "strlen(buffer) == 0" (thanks dothebart)
This commit is contained in:
parent
b3970b36a5
commit
64d8d40b25
|
@ -74,7 +74,7 @@ void stdin_io_cb(struct ev_loop *loop, ev_io *watcher, int revents) {
|
||||||
}
|
}
|
||||||
rec += n;
|
rec += n;
|
||||||
}
|
}
|
||||||
if (strlen(buffer) == 0) {
|
if (*buffer == '\0') {
|
||||||
FREE(buffer);
|
FREE(buffer);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue