From e37c0dc100c51541accf81e4763d0cdba807db34 Mon Sep 17 00:00:00 2001 From: Phil Oester Date: Fri, 4 Feb 2005 07:38:02 +0000 Subject: Revert the recent addition of memset()'s to TC_COMMIT. One of them is bogus and the other one needs more investigation to why valgrind is complaining. Noticed and reverted by Phil Oester. --- libiptc/libiptc.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/libiptc/libiptc.c b/libiptc/libiptc.c index 7bed2211..d3d0fa7e 100644 --- a/libiptc/libiptc.c +++ b/libiptc/libiptc.c @@ -2047,7 +2047,6 @@ TC_COMMIT(TC_HANDLE_T *handle) counterlen = sizeof(STRUCT_COUNTERS_INFO) + sizeof(STRUCT_COUNTERS) * new_number; - memset(repl, 0, sizeof(*repl) + (*handle)->entries->size); /* These are the old counters we will get from kernel */ repl->counters = malloc(sizeof(STRUCT_COUNTERS) @@ -2057,8 +2056,6 @@ TC_COMMIT(TC_HANDLE_T *handle) errno = ENOMEM; return 0; } - memset(repl->counters, 0, sizeof(STRUCT_COUNTERS) - * (*handle)->info.num_entries); /* These are the counters we're going to put back, later. */ newcounters = malloc(counterlen); if (!newcounters) { -- cgit v1.2.3