瀏覽代碼

HBSD: Remove redundant memset

Call to memset isn't needed when using M_ZERO.

Signed-off-by:	Shawn Webb <shawn.webb@hardenedbsd.org>
remotes/github/hardened/current/tmpfs_extattr
Shawn Webb 3 月之前
父節點
當前提交
d20f951e66
共有 1 個文件被更改,包括 0 次插入1 次删除
  1. +0
    -1
      sys/fs/tmpfs/tmpfs_vnops.c

+ 0
- 1
sys/fs/tmpfs/tmpfs_vnops.c 查看文件

@@ -1726,7 +1726,6 @@ tmpfs_extattr_set(struct vnode *vp, int attrnamespace, const char *name,
if (attr == NULL) {
sz = MIN(TMPFS_EXTATTR_MAXVALUESIZE, uio->uio_resid);
attr = malloc(sizeof(*attr), M_TEMP, M_WAITOK|M_ZERO);
memset(attr, 0, sizeof(*attr));

attr->tele_value = malloc(sz, M_TEMP, M_WAITOK);
attr->tele_value_size = sz;


Loading…
取消
儲存