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:
Changpeng Liu 2017-12-12 13:21:54 +08:00 committed by Jim Harris
parent 11774a35a8
commit ea11d68481

View File

@ -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;