ACK: [PATCH] lib: fwts_log_scan: ensure accumulated error count is initialized
Alex Hung
alex.hung at canonical.com
Mon Jun 10 20:30:41 UTC 2019
On 2019-06-10 4:39 a.m., Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> Just in case the caller has not initialized the error count, set it
> to zero.
>
> Addresses-Coverity: ("Uninitialized scalar variable")
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
> src/lib/src/fwts_log_scan.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/src/lib/src/fwts_log_scan.c b/src/lib/src/fwts_log_scan.c
> index 140e8761..c1d15d9c 100644
> --- a/src/lib/src/fwts_log_scan.c
> +++ b/src/lib/src/fwts_log_scan.c
> @@ -365,6 +365,8 @@ int fwts_log_check(fwts_framework *fw,
> json_object *log_table;
> fwts_log_pattern *patterns;
>
> + *errors = 0;
> +
> /*
> * json_object_from_file() can fail when files aren't readable
> * so check if we can open for read before calling json_object_from_file()
>
Acked-by: Alex Hung <alex.hung at canonical.com>
More information about the fwts-devel
mailing list