Jelajahi Sumber

run_command: Clean up

Aaron Marcher 7 tahun lalu
induk
melakukan
f007007156
1 mengubah file dengan 1 tambahan dan 2 penghapusan
  1. 1 2
      components/run_command.c

+ 1 - 2
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;
 	}