[PATCH][RESUBMIT] lib: fwts_fileio.c: remove unnecessary variable len
Alex Hung
alex.hung at canonical.com
Wed Apr 11 08:19:15 UTC 2012
On 04/11/2012 04:13 PM, Colin King wrote:
> From: Colin Ian King<colin.king at canonical.com>
>
> Signed-off-by: Colin Ian King<colin.king at canonical.com>
> ---
> src/lib/src/fwts_fileio.c | 3 +--
> 1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/src/lib/src/fwts_fileio.c b/src/lib/src/fwts_fileio.c
> index c0a6f15..b3131e3 100644
> --- a/src/lib/src/fwts_fileio.c
> +++ b/src/lib/src/fwts_fileio.c
> @@ -37,8 +37,7 @@ fwts_list *fwts_file_read(FILE *fp)
> return NULL;
>
> while (fgets(buffer, sizeof(buffer), fp) != NULL) {
> - int len = strlen(buffer);
> - buffer[len-1] = '\0'; /* Chop off "\n" */
> + buffer[strlen(buffer) - 1] = '\0'; /* Chop off "\n" */
> fwts_text_list_append(list, buffer);
> }
>
Acked-by: Alex Hung <alex.hung at canonical.com>
More information about the fwts-devel
mailing list