diff options
author | Robert James Kaes <rjkaes@users.sourceforge.net> | 2004-04-27 18:48:53 +0000 |
---|---|---|
committer | Robert James Kaes <rjkaes@users.sourceforge.net> | 2004-04-27 18:48:53 +0000 |
commit | 3b961ec66bdcf892c14045685f533febe3386ffb (patch) | |
tree | 58130a4e02273bcec8831f76b339d710fb79c7a5 /src | |
parent | 095d0d014257c7f92c91110a7773c125a0e08c50 (diff) | |
download | tinyproxy-3b961ec66bdcf892c14045685f533febe3386ffb.tar.gz tinyproxy-3b961ec66bdcf892c14045685f533febe3386ffb.zip |
(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!)
Diffstat (limited to 'src')
-rw-r--r-- | src/stats.c | 4 |
1 files 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)); } /* |