added memset and NULL initializers to keep valgrind happy
authorChristian Würdig <chriswue@ipd.info.uni-karlsruhe.de>
Mon, 28 Aug 2006 10:51:09 +0000 (10:51 +0000)
committerChristian Würdig <chriswue@ipd.info.uni-karlsruhe.de>
Mon, 28 Aug 2006 10:51:09 +0000 (10:51 +0000)
[r8134]

ir/tv/fltcalc.c
ir/tv/tv.c

index 761bf83..eda9f5e 100644 (file)
@@ -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"));
index 9ccdbad..dd744b7 100644 (file)
@@ -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;
 
 /****************************************************************************