diff options
author | Karel Zak | 2015-04-22 10:20:31 +0200 |
---|---|---|
committer | Karel Zak | 2015-04-22 10:20:31 +0200 |
commit | 622be27845d00275fdf24f77918d935f13d18c2e (patch) | |
tree | 0e7873653594cf49d4081afd32b40b2ca2868e3d /disk-utils/fdisk-list.c | |
parent | Merge branch 'tests-refactor-loop-cleanup' of https://github.com/rudimeier/ut... (diff) | |
download | kernel-qcow2-util-linux-622be27845d00275fdf24f77918d935f13d18c2e.tar.gz kernel-qcow2-util-linux-622be27845d00275fdf24f77918d935f13d18c2e.tar.xz kernel-qcow2-util-linux-622be27845d00275fdf24f77918d935f13d18c2e.zip |
fdisk, sfdisk: fix -o <list> backend
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'disk-utils/fdisk-list.c')
-rw-r--r-- | disk-utils/fdisk-list.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/disk-utils/fdisk-list.c b/disk-utils/fdisk-list.c index e8a059677..6cd582174 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)); |