From 3b961ec66bdcf892c14045685f533febe3386ffb Mon Sep 17 00:00:00 2001 From: Robert James Kaes Date: Tue, 27 Apr 2004 18:48:53 +0000 Subject: (init_stats): Fixed a memset bug, where the structure was not cleared properly. (The sizeof "struct stat" was being used rather than the proper "struct stat_s". On my system, "struct stat" is 88 bytes long, while "struct stat_s" is 20 bytes long. Quite a difference!) --- src/stats.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stats.c b/src/stats.c index ab7efd2..28a1280 100644 --- a/src/stats.c +++ b/src/stats.c @@ -1,4 +1,4 @@ -/* $Id: stats.c,v 1.15 2004-02-13 21:27:42 rjkaes Exp $ +/* $Id: stats.c,v 1.16 2004-04-27 18:48:53 rjkaes Exp $ * * This module handles the statistics for tinyproxy. There are only two * public API functions. The reason for the functions, rather than just a @@ -49,7 +49,7 @@ init_stats(void) if (stats == MAP_FAILED) return; - memset(stats, 0, sizeof(struct stat)); + memset(stats, 0, sizeof(struct stat_s)); } /* -- cgit v1.2.3