util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fsck.minix: remove unnecessary memset calls
@ 2011-11-08 22:14 Francesco Cosoleto
  2011-11-08 22:14 ` [PATCH] libblkid: silence a format string warning Francesco Cosoleto
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Francesco Cosoleto @ 2011-11-08 22:14 UTC (permalink / raw)
  To: util-linux; +Cc: Francesco Cosoleto

The program aborts without using this unintialized allocated memory,
setting to zero doesn't look needed.

memset calls with sizeof() of pointer as argument (reported by clang).

Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
---
 disk-utils/fsck.minix.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/disk-utils/fsck.minix.c b/disk-utils/fsck.minix.c
index eb02f9e..90c9200 100644
--- a/disk-utils/fsck.minix.c
+++ b/disk-utils/fsck.minix.c
@@ -611,8 +611,6 @@ read_tables(void) {
 	zone_map = malloc(zmaps * MINIX_BLOCK_SIZE);
 	if (!inode_map)
 		die(_("Unable to allocate buffer for zone map"));
-	memset(inode_map,0,sizeof(inode_map));
-	memset(zone_map,0,sizeof(zone_map));
 	inode_buffer = malloc(buffsz);
 	if (!inode_buffer)
 		die(_("Unable to allocate buffer for inodes"));
-- 
1.7.3.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-11-09  9:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-08 22:14 [PATCH] fsck.minix: remove unnecessary memset calls Francesco Cosoleto
2011-11-08 22:14 ` [PATCH] libblkid: silence a format string warning Francesco Cosoleto
2011-11-08 22:14 ` [PATCH] whereis: remove unused value warning Francesco Cosoleto
2011-11-08 22:14 ` [PATCH] whereis: silence comparison between signed/unsigned warning Francesco Cosoleto
2011-11-09  9:07   ` Karel Zak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).