From: Eric Biggers Date: Tue, 13 May 2014 00:17:06 +0000 (-0500) Subject: dentry.c: Remove dentry_common_init() X-Git-Tag: v1.7.0~206 X-Git-Url: https://wimlib.net/git/?p=wimlib;a=commitdiff_plain;h=1b807ffe06fef11d62e6e57d6b21e808a4978750 dentry.c: Remove dentry_common_init() --- 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) {