From: Aaron Marcher Date: Wed, 2 May 2018 06:29:36 +0000 (+0200) Subject: run_command: Clean up X-Git-Url: https://git.atheridis.org/?a=commitdiff_plain;h=f0070071566ad27fa36c49312e1ba3946cd472b5;p=suckless%2Fslstatus.git run_command: Clean up --- diff --git a/components/run_command.c b/components/run_command.c index 2041ae4..e356620 100644 --- a/components/run_command.c +++ b/components/run_command.c @@ -11,8 +11,7 @@ run_command(const char *cmd) char *p; FILE *fp; - fp = popen(cmd, "r"); - if (fp == NULL) { + if (!(fp = popen(cmd, "r"))) { fprintf(stderr, "popen '%s': %s\n", cmd, strerror(errno)); return NULL; }