From 96eeda03248b57eb0dd96ec1c17080103f24bc96 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Mon, 2 Feb 2004 22:35:07 +0000 Subject: [PATCH] Fix for memset bug found by buildfarm. --- flist.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/flist.c b/flist.c index f00ecfc7..60a0e8df 100644 --- a/flist.c +++ b/flist.c @@ -80,7 +80,6 @@ void init_flist(void) /* Figure out how big the file_struct is without trailing padding */ min_file_struct_len = ((char*)&f.flags - (char*)&f) + sizeof f.flags; - min_file_struct_len = sizeof f; /* XXX test for build-farm */ } @@ -1331,7 +1330,7 @@ void free_file(struct file_struct *file, int free_the_struct) if (free_the_struct) free(file); else - memset(file, 0, sizeof file[0]); + memset(file, 0, min_file_struct_len); } -- 2.34.1