mtd/fs/jffs2 nodelist.c,1.88,1.89

Artem Bityuckiy dedekind at infradead.org
Sun Nov 28 07:20:37 EST 2004


Update of /home/cvs/mtd/fs/jffs2
In directory phoenix.infradead.org:/tmp/cvs-serv621

Modified Files:
	nodelist.c 
Log Message:
Remove unneeded memset


Index: nodelist.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/nodelist.c,v
retrieving revision 1.88
retrieving revision 1.89
diff -u -r1.88 -r1.89
--- nodelist.c	16 Nov 2004 20:36:11 -0000	1.88
+++ nodelist.c	28 Nov 2004 12:20:35 -0000	1.89
@@ -182,7 +182,6 @@
 				err = -ENOMEM;
 				goto free_out;
 			}
-			memset(fd,0,sizeof(struct jffs2_full_dirent) + node.d.nsize+1);
 			fd->raw = ref;
 			fd->version = je32_to_cpu(node.d.version);
 			fd->ino = je32_to_cpu(node.d.ino);
@@ -220,6 +219,7 @@
 			}
 			fd->nhash = full_name_hash(fd->name, node.d.nsize);
 			fd->next = NULL;
+			fd->name[node.d.nsize] = '\0';
 				/* Wheee. We now have a complete jffs2_full_dirent structure, with
 				   the name in it and everything. Link it into the list 
 				*/





More information about the linux-mtd-cvs mailing list