swaymsg: 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:52 +02:00
parent c71a8b0b7b
commit 187c4894d0

View file

@ -481,7 +481,7 @@ int main(int argc, char **argv) {
// pretty print the json // pretty print the json
json_object *obj = json_tokener_parse(resp); json_object *obj = json_tokener_parse(resp);
if (obj == NULL) { if (!obj) {
if (!quiet) { if (!quiet) {
fprintf(stderr, "ERROR: Could not parse json response from ipc. " fprintf(stderr, "ERROR: Could not parse json response from ipc. "
"This is a bug in sway."); "This is a bug in sway.");
@ -518,7 +518,7 @@ int main(int argc, char **argv) {
} }
json_object *obj = json_tokener_parse(reply->payload); json_object *obj = json_tokener_parse(reply->payload);
if (obj == NULL) { if (!obj) {
if (!quiet) { if (!quiet) {
fprintf(stderr, "ERROR: Could not parse json response from" fprintf(stderr, "ERROR: Could not parse json response from"
" ipc. This is a bug in sway."); " ipc. This is a bug in sway.");