mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-05 16:00:05 +01:00
Get page size should never fail (in the works case it fails later with wrong alignment).
This commit is contained in:
@@ -128,14 +128,9 @@ static int cipher_perf(struct cipher_perf *cp,
|
||||
{
|
||||
long ms_enc, ms_dec, ms;
|
||||
int repeat_enc, repeat_dec;
|
||||
size_t alignment;
|
||||
void *buf = NULL;
|
||||
|
||||
alignment = crypt_getpagesize();
|
||||
if (alignment < 0)
|
||||
return -EINVAL;
|
||||
|
||||
if (posix_memalign(&buf, alignment, cp->buffer_size))
|
||||
if (posix_memalign(&buf, crypt_getpagesize(), cp->buffer_size))
|
||||
return -ENOMEM;
|
||||
|
||||
ms_enc = 0;
|
||||
|
||||
Reference in New Issue
Block a user