mirror of
https://github.com/jedisct1/libsodium.git
synced 2024-12-19 18:15:18 -07:00
Nits
This commit is contained in:
parent
875fbd0e91
commit
91d9051bce
@ -67,7 +67,7 @@ store_block(void *output, const block *src)
|
||||
* @param m_cost number of blocks to allocate in the memory
|
||||
* @return ARGON2_OK if @memory is a valid pointer and memory is allocated
|
||||
*/
|
||||
static int allocate_memory(block_region **memory, uint32_t m_cost);
|
||||
static int allocate_memory(block_region **region, uint32_t m_cost);
|
||||
|
||||
static int
|
||||
allocate_memory(block_region **region, uint32_t m_cost)
|
||||
@ -153,7 +153,7 @@ clear_memory(argon2_instance_t *instance, int clear)
|
||||
/* Deallocates memory
|
||||
* @param memory pointer to the blocks
|
||||
*/
|
||||
static void free_memory(block_region *memory);
|
||||
static void free_memory(block_region *region);
|
||||
|
||||
static void
|
||||
free_memory(block_region *region)
|
||||
|
@ -163,8 +163,9 @@ salsa20_8(uint32_t B[16])
|
||||
x[15] ^= R(x[14] + x[13], 18);
|
||||
#undef R
|
||||
}
|
||||
for (i = 0; i < 16; i++)
|
||||
for (i = 0; i < 16; i++) {
|
||||
B[i] += x[i];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -55,9 +55,9 @@ alloc_region(escrypt_region_t *region, size_t size)
|
||||
aligned = base;
|
||||
#else
|
||||
base = aligned = NULL;
|
||||
if (size + 63 < size)
|
||||
if (size + 63 < size) {
|
||||
errno = ENOMEM;
|
||||
else if ((base = (uint8_t *) malloc(size + 63)) != NULL) {
|
||||
} else if ((base = (uint8_t *) malloc(size + 63)) != NULL) {
|
||||
aligned = base + 63;
|
||||
aligned -= (uintptr_t) aligned & 63;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user