Use "*buffer == '\0'" instead of "strlen(buffer) == 0" (thanks dothebart)
This commit is contained in:
parent
3daab599ca
commit
600c4ae95c
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue