From c0641a647427dea7c7eb3aa894f5b62fa52aed18 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Christian=20W=C3=BCrdig?= Date: Mon, 28 Aug 2006 10:51:09 +0000 Subject: [PATCH] added memset and NULL initializers to keep valgrind happy [r8134] --- ir/tv/fltcalc.c | 1 + ir/tv/tv.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ir/tv/fltcalc.c b/ir/tv/fltcalc.c index 761bf8362..eda9f5ede 100644 --- a/ir/tv/fltcalc.c +++ b/ir/tv/fltcalc.c @@ -1584,6 +1584,7 @@ void init_fltcalc(int precision) calc_buffer_size = DESCRIPTOR_POS + sizeof(descriptor_t); calc_buffer = xmalloc(calc_buffer_size); + memset(calc_buffer, 0, calc_buffer_size); DEBUGPRINTF(("init fltcalc:\n\tVALUE_SIZE = %d\n\tSIGN_POS = %d\n\tEXPONENT_POS = %d\n\tMANTISSA_POS = %d\n\tDESCRIPTOR_POS = %d\n\tCALC_BUFFER_SIZE = %d\n\tcalc_buffer = %p\n\n", value_size, SIGN_POS, EXPONENT_POS, MANTISSA_POS, DESCRIPTOR_POS, calc_buffer_size, calc_buffer)); #ifdef HAVE_LONG_DOUBLE DEBUGPRINTF(("\tUsing long double (1-15-64) interface\n")); diff --git a/ir/tv/tv.c b/ir/tv/tv.c index 9ccdbad1c..dd744b76c 100644 --- a/ir/tv/tv.c +++ b/ir/tv/tv.c @@ -98,8 +98,8 @@ static long long count = 0; /**************************************************************************** * private variables ****************************************************************************/ -static struct set *tarvals; /* container for tarval structs */ -static struct set *values; /* container for values */ +static struct set *tarvals = NULL; /* container for tarval structs */ +static struct set *values = NULL; /* container for values */ static tarval_int_overflow_mode_t int_overflow_mode = TV_OVERFLOW_WRAP; /**************************************************************************** -- 2.20.1