Message ID | 1316206180-6375-17-git-send-email-sandeen@redhat.com |
---|---|
State | Accepted, archived |
Headers | show |
On Fri, Sep 16, 2011 at 03:49:31PM -0500, Eric Sandeen wrote: > e2fsck_allocate_memory() already sets allocated memory to 0, > so remove the explicit memset. > > Especially since it was setting the wrong size (iter not *iter) > > Signed-off-by: Eric Sandeen <sandeen@redhat.com> Applied, thanks. - Ted -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/e2fsck/dirinfo.c b/e2fsck/dirinfo.c index 901235c..ace5b4d 100644 --- a/e2fsck/dirinfo.c +++ b/e2fsck/dirinfo.c @@ -318,7 +318,6 @@ extern struct dir_info_iter *e2fsck_dir_info_iter_begin(e2fsck_t ctx) iter = e2fsck_allocate_memory(ctx, sizeof(struct dir_info_iter), "dir_info iterator"); - memset(iter, 0, sizeof(iter)); if (db->tdb) iter->tdb_iter = tdb_firstkey(db->tdb);
e2fsck_allocate_memory() already sets allocated memory to 0, so remove the explicit memset. Especially since it was setting the wrong size (iter not *iter) Signed-off-by: Eric Sandeen <sandeen@redhat.com> --- e2fsck/dirinfo.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)