diff --git a/s25f.c b/s25f.c index dd15efcdb..b0f2438d1 100644 --- a/s25f.c +++ b/s25f.c @@ -291,7 +291,7 @@ int s25fs_block_erase_d8(struct flashctx *flash, unsigned int addr, unsigned int s25fs_read_cr(flash, CR3NV_ADDR)); /* Restore CR3V when flashrom exits */ - uint8_t *data = calloc(sizeof(uint8_t), 1); + uint8_t *data = calloc(1, sizeof(uint8_t)); if (!data) { msg_cerr("Out of memory!\n"); return 1; diff --git a/spi25_statusreg.c b/spi25_statusreg.c index 98988af63..ceb2c7796 100644 --- a/spi25_statusreg.c +++ b/spi25_statusreg.c @@ -310,7 +310,7 @@ static int spi_disable_blockprotect_generic(struct flashctx *flash, uint8_t bp_m } /* Restore status register content upon exit in finalize_flash_access(). */ - uint8_t *data = calloc(sizeof(uint8_t), 1); + uint8_t *data = calloc(1, sizeof(uint8_t)); if (!data) { msg_cerr("Out of memory!\n"); return 1;