]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
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 b21cf72272b6cfdaaf84adab464d11d882607c9c..8d6db3490db95057b32168c3302fd0e2a0ee4e48 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 = -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;
        PARA_INFO_LOG("successfully read %d bit ssh public key\n", ret * 8);
        key = para_malloc(sizeof(*key));
        key->num_bytes = ret;