tests: use alloca when allocating scratch buffer for writesame

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
This commit is contained in:
Ronnie Sahlberg
2014-05-20 17:52:23 -07:00
parent b7089d64e1
commit e66b50f8ec
3 changed files with 3 additions and 6 deletions

View File

@@ -39,7 +39,7 @@ test_writesame16_unmap_until_end(void)
CHECK_FOR_LBPWS;
CHECK_FOR_SBC;
zeroBlock = malloc(block_size);
zeroBlock = alloca(block_size);
memset(zeroBlock, 0, block_size);
logging(LOG_VERBOSE, LOG_BLANK_LINE);
@@ -79,5 +79,4 @@ test_writesame16_unmap_until_end(void)
"and verify zero test");
}
}
free(zeroBlock);
}