]> git.ipfire.org Git - thirdparty/strongswan.git/blobdiff - src/libstrongswan/plugins/openssl/openssl_hasher.c
Add a return value to hasher_t.allocate_hash()
[thirdparty/strongswan.git] / src / libstrongswan / plugins / openssl / openssl_hasher.c
index 5b353647a2ce552999a8aeba8ce3ccb6942437da..67b49c186161244d7c76aa0ea7bce1b2c118e37a 100644 (file)
@@ -120,18 +120,15 @@ METHOD(hasher_t, get_hash, bool,
        return TRUE;
 }
 
-METHOD(hasher_t, allocate_hash, void,
+METHOD(hasher_t, allocate_hash, bool,
        private_openssl_hasher_t *this, chunk_t chunk, chunk_t *hash)
 {
        if (hash)
        {
                *hash = chunk_alloc(get_hash_size(this));
-               get_hash(this, chunk, hash->ptr);
-       }
-       else
-       {
-               get_hash(this, chunk, NULL);
+               return get_hash(this, chunk, hash->ptr);
        }
+       return get_hash(this, chunk, NULL);
 }
 
 METHOD(hasher_t, destroy, void,