[hackers] [slstatus] run_command: Clean up || Aaron Marcher

From: <git_AT_suckless.org>
Date: Wed, 2 May 2018 08:49:37 +0200 (CEST)

commit f0070071566ad27fa36c49312e1ba3946cd472b5
Author: Aaron Marcher <me_AT_drkhsh.at>
AuthorDate: Wed May 2 08:29:36 2018 +0200
Commit: Aaron Marcher <me_AT_drkhsh.at>
CommitDate: Wed May 2 08:29:36 2018 +0200

    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
_AT_@ -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;
         }
Received on Wed May 02 2018 - 08:49:37 CEST

This archive was generated by hypermail 2.3.0 : Wed May 02 2018 - 09:00:39 CEST