Put the arguments to aligned_alloc in the right order.

This commit is contained in:
Warner Losh 2017-02-04 05:52:50 +00:00
parent 8a99f1cc59
commit 3f13e7a8a2

View File

@ -114,7 +114,7 @@ update_firmware(int fd, uint8_t *payload, int32_t payload_size)
off = 0;
resid = payload_size;
if ((chunk = aligned_alloc(NVME_MAX_XFER_SIZE, PAGE_SIZE)) == NULL)
if ((chunk = aligned_alloc(PAGE_SIZE, NVME_MAX_XFER_SIZE)) == NULL)
errx(1, "unable to malloc %d bytes", NVME_MAX_XFER_SIZE);
while (resid > 0) {