swaybar: Use "!ptr" for comparison to NULL

Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
This commit is contained in:
Elyes HAOUAS 2021-04-13 10:33:35 +02:00
parent a6d761a31c
commit c71a8b0b7b
4 changed files with 6 additions and 6 deletions

View file

@ -51,7 +51,7 @@ bool status_handle_readable(struct status_line *status) {
status->buffer_size = available_bytes + 1;
status->buffer = realloc(status->buffer, status->buffer_size);
}
if (status->buffer == NULL) {
if (!status->buffer) {
sway_log_errno(SWAY_ERROR, "Unable to read status line");
status_error(status, "[error reading from status command]");
return true;