From 622be27845d00275fdf24f77918d935f13d18c2e Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 22 Apr 2015 10:20:31 +0200 Subject: [PATCH] fdisk, sfdisk: fix -o backend Signed-off-by: Karel Zak --- disk-utils/fdisk-list.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/disk-utils/fdisk-list.c b/disk-utils/fdisk-list.c index e8a0596771..6cd5821742 100644 --- a/disk-utils/fdisk-list.c +++ b/disk-utils/fdisk-list.c @@ -371,7 +371,7 @@ int *init_fields(struct fdisk_context *cxt, const char *str, size_t *n) if (fdisk_label_get_fields_ids(NULL, cxt, &dflt_ids, &fields_nids)) goto done; - fields_ids = xcalloc(sizeof(int), FDISK_NFIELDS * 2); + fields_ids = xcalloc(FDISK_NFIELDS * 2, sizeof(int)); /* copy defaults to the list with wanted fields */ memcpy(fields_ids, dflt_ids, fields_nids * sizeof(int)); -- 2.47.3