From 1b807ffe06fef11d62e6e57d6b21e808a4978750 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Mon, 12 May 2014 19:17:06 -0500 Subject: [PATCH] dentry.c: Remove dentry_common_init() --- src/dentry.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/dentry.c b/src/dentry.c index 15dfcdfc..9e831858 100644 --- a/src/dentry.c +++ b/src/dentry.c @@ -906,13 +906,6 @@ wim_pathname_to_stream(WIMStruct *wim, } #endif /* WITH_FUSE */ -/* Initializations done on every `struct wim_dentry'. */ -static void -dentry_common_init(struct wim_dentry *dentry) -{ - memset(dentry, 0, sizeof(struct wim_dentry)); -} - /* Creates an unlinked directory entry. */ int new_dentry(const tchar *name, struct wim_dentry **dentry_ret) @@ -920,11 +913,10 @@ new_dentry(const tchar *name, struct wim_dentry **dentry_ret) struct wim_dentry *dentry; int ret; - dentry = MALLOC(sizeof(struct wim_dentry)); - if (dentry == NULL) + dentry = CALLOC(1, sizeof(struct wim_dentry)); + if (!dentry) return WIMLIB_ERR_NOMEM; - dentry_common_init(dentry); if (*name) { ret = dentry_set_name(dentry, name); if (ret) { -- 2.43.0