(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!)
This commit is contained in:
parent
095d0d0142
commit
3b961ec66b
@ -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
|
* This module handles the statistics for tinyproxy. There are only two
|
||||||
* public API functions. The reason for the functions, rather than just a
|
* public API functions. The reason for the functions, rather than just a
|
||||||
@ -49,7 +49,7 @@ init_stats(void)
|
|||||||
if (stats == MAP_FAILED)
|
if (stats == MAP_FAILED)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
memset(stats, 0, sizeof(struct stat));
|
memset(stats, 0, sizeof(struct stat_s));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user