Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e401716

Browse files
committed
fdisk, sfdisk: fix -o <list> backend
Signed-off-by: Karel Zak <[email protected]>
1 parent 6e9c8be commit e401716

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

disk-utils/fdisk-list.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ int *init_fields(struct fdisk_context *cxt, const char *str, size_t *n)
371371
if (fdisk_label_get_fields_ids(NULL, cxt, &dflt_ids, &fields_nids))
372372
goto done;
373373

374-
fields_ids = xcalloc(sizeof(int), FDISK_NFIELDS * 2);
374+
fields_ids = xcalloc(FDISK_NFIELDS * 2, sizeof(int));
375375

376376
/* copy defaults to the list with wanted fields */
377377
memcpy(fields_ids, dflt_ids, fields_nids * sizeof(int));

0 commit comments

Comments
 (0)