mirror of
https://github.com/swaywm/sway.git
synced 2026-04-25 06:46:24 -04:00
swaymsg: Use "!ptr" for comparison to NULL
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
This commit is contained in:
parent
c71a8b0b7b
commit
187c4894d0
1 changed files with 2 additions and 2 deletions
|
|
@ -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.");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue