From f0070071566ad27fa36c49312e1ba3946cd472b5 Mon Sep 17 00:00:00 2001 From: Aaron Marcher Date: Wed, 2 May 2018 08:29:36 +0200 Subject: run_command: Clean up --- components/run_command.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'components/run_command.c') 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; } -- cgit v1.2.3