gcrypt: Use ROUND_DOWN() macro.
authorAndre Noll <maan@tuebingen.mpg.de>
Thu, 28 Dec 2017 20:48:10 +0000 (21:48 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 25 Feb 2018 23:10:28 +0000 (00:10 +0100)
gcrypt.c

index b21cf72..8d6db34 100644 (file)
--- a/gcrypt.c
+++ b/gcrypt.c
@@ -406,7 +406,7 @@ int apc_get_pubkey(const char *key_file, struct asymmetric_key **result)
                ret = -E_SEXP_BUILD;
                goto release_n;
        }
-       ret = nr_scanned / 32 * 32;
+       ret = ROUND_DOWN(nr_scanned, 32);
        PARA_INFO_LOG("successfully read %d bit ssh public key\n", ret * 8);
        key = para_malloc(sizeof(*key));
        key->num_bytes = ret;