diff mbox

[1/2] validation: init: fix unitalized data in struct

Message ID 1424104995-18327-1-git-send-email-mike.holmes@linaro.org
State New
Headers show

Commit Message

Mike Holmes Feb. 16, 2015, 4:43 p.m. UTC
struct odp_init_t init_data was not fully initalized.

Fixes https://bugs.linaro.org/show_bug.cgi?id=1206

Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
---
 test/validation/odp_init_log.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Maxim Uvarov Feb. 16, 2015, 4:55 p.m. UTC | #1
On 02/16/2015 07:43 PM, Mike Holmes wrote:
> struct odp_init_t init_data was not fully initalized.
>
> Fixes https://bugs.linaro.org/show_bug.cgi?id=1206
>
> Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
> ---
>   test/validation/odp_init_log.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/test/validation/odp_init_log.c b/test/validation/odp_init_log.c
> index 372d4f5..378d2bd 100644
> --- a/test/validation/odp_init_log.c
> +++ b/test/validation/odp_init_log.c
> @@ -17,6 +17,7 @@ static void test_odp_init_global_replace_log(void)
>   	int status;
>   	struct odp_init_t init_data;
>   
> +	init_data.abort_fn = NULL;
>   	init_data.log_fn = &odp_init_log;
I thing memset(init_data, 0, sizeof(struct odp_init_t)) is better here 
in case if this struct will be extended later.

Maxim.

>   
>   	replacement_logging_used = 0;
diff mbox

Patch

diff --git a/test/validation/odp_init_log.c b/test/validation/odp_init_log.c
index 372d4f5..378d2bd 100644
--- a/test/validation/odp_init_log.c
+++ b/test/validation/odp_init_log.c
@@ -17,6 +17,7 @@  static void test_odp_init_global_replace_log(void)
 	int status;
 	struct odp_init_t init_data;
 
+	init_data.abort_fn = NULL;
 	init_data.log_fn = &odp_init_log;
 
 	replacement_logging_used = 0;