bdev/aio: make calloc with the right usage
Change-Id: I5c6fd2f398035da1eac789dbeae1f0228d98be17 Signed-off-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-on: https://review.gerrithub.io/391335 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com> Reviewed-by: <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
11774a35a8
commit
ea11d68481
@ -422,7 +422,7 @@ create_aio_disk(const char *name, const char *filename, uint32_t block_size)
|
|||||||
uint64_t disk_size;
|
uint64_t disk_size;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
fdisk = calloc(sizeof(*fdisk), 1);
|
fdisk = calloc(1, sizeof(*fdisk));
|
||||||
if (!fdisk) {
|
if (!fdisk) {
|
||||||
SPDK_ERRLOG("Unable to allocate enough memory for aio backend\n");
|
SPDK_ERRLOG("Unable to allocate enough memory for aio backend\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user