[PATCH] lib: fwts_pipeio: remove variable status

Colin King colin.king at canonical.com
Wed Jan 31 10:17:41 UTC 2018


From: Colin Ian King <colin.king at canonical.com>

Clean up code, we can remove variable status

Signed-off-by: Colin Ian King <colin.king at canonical.com>
---
 src/lib/src/fwts_pipeio.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/lib/src/fwts_pipeio.c b/src/lib/src/fwts_pipeio.c
index 76d7ffc2..60030dee 100644
--- a/src/lib/src/fwts_pipeio.c
+++ b/src/lib/src/fwts_pipeio.c
@@ -333,7 +333,7 @@ int fwts_exec(const char *command, int *status)
 int fwts_exec2(const char *command, char **output)
 {
 	pid_t   pid;
-	int     status = -1, in_fd, out_fd;
+	int     in_fd, out_fd;
 	ssize_t out_len;
 
 	if (fwts_pipe_open_rw(command, &pid,
@@ -347,9 +347,7 @@ int fwts_exec2(const char *command, char **output)
 		return -1;
 	}
 
-	status = fwts_pipe_close2(in_fd, out_fd, pid);
-
-	return status;
+	return fwts_pipe_close2(in_fd, out_fd, pid);
 }
 
 /*
-- 
2.15.1




More information about the fwts-devel mailing list