commit f0070071566ad27fa36c49312e1ba3946cd472b5
parent 7c11f890a5296ddd527ca956503bb33ceacd3ca9
Author: Aaron Marcher <me@drkhsh.at>
Date: Wed, 2 May 2018 08:29:36 +0200
run_command: Clean up
Diffstat:
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git 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;
}