LVM2/libdm/ioctl libdm-iface.c
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac at sourceware.org 2011-10-17 14:36:06
Modified files:
libdm/ioctl : libdm-iface.c
Log message:
Use zalloc for malloc,memset
libdm/ioctl/libdm-iface.c +1 -3
@@ -852,7 +852,7 @@struct target *create_target (uint64_t start,uint64_t len,const char *type,const char *params) { -struct target *t =dm_malloc (sizeof (*t)); +struct target *t =dm_zalloc (sizeof (*t));if (!t) { log_error("create_target: malloc(%" PRIsize_t ") failed",
@@ -860,8 +860,6 @@return NULL ; } -memset (t,0 ,sizeof (*t)); -if (!(t->params =dm_strdup (params))) {log_error ("create_target: strdup(params) failed" ); goto bad;