ACK: [PATCH] lib: fwts_pipeio: remove variable status
Alex Hung
alex.hung at canonical.com
Fri Feb 2 02:49:01 UTC 2018
On 2018-01-31 02:17 AM, Colin King wrote:
> 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);
> }
>
> /*
>
Acked-by: Alex Hung <alex.hung at canonical.com>
More information about the fwts-devel
mailing list