Use one file for macros and basic constants for the whole project.

And avoid some dual definitions between tools and library.
This commit is contained in:
Milan Broz
2021-02-05 13:39:54 +01:00
parent 4471452105
commit 76301cef4c
7 changed files with 65 additions and 41 deletions

View File

@@ -196,7 +196,7 @@ int crypt_benchmark_pbkdf_internal(struct crypt_device *cd,
PBKDF2_tmp = ((double)pbkdf->iterations * pbkdf->time_ms / 1000.);
if (PBKDF2_tmp > (double)UINT32_MAX)
return -EINVAL;
pbkdf->iterations = at_least((uint32_t)PBKDF2_tmp, pbkdf_limits.min_iterations);
pbkdf->iterations = AT_LEAST((uint32_t)PBKDF2_tmp, pbkdf_limits.min_iterations);
} else {
/* Already benchmarked */
if (pbkdf->iterations) {