ACK: [PATCH] lib: fwts_log_scan: ensure accumulated error count is initialized
ivanhu
ivan.hu at canonical.com
Tue Jun 11 05:45:45 UTC 2019
On 6/10/19 7:39 PM, 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: Ivan Hu <ivan.hu at canonical.com>
More information about the fwts-devel
mailing list