lib/crypto: avoid 'return void_function();' which isn't portable
authorStefan Metzmacher <metze@samba.org>
Wed, 21 Mar 2018 06:33:16 +0000 (07:33 +0100)
committerKarolin Seeger <kseeger@samba.org>
Fri, 20 Apr 2018 09:56:23 +0000 (11:56 +0200)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13343

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Björn Jacke <bjacke@samba.org>
(cherry picked from commit 7ae77db3b29ef08e1f74aa413049b995a598a5dd)

lib/crypto/aes.c

index d16d715482e5608ba56dd0b34a6340a40d46d4fd..4ff019af91a3708ede2c0f8c3fd88bda7928c889 100644 (file)
@@ -236,18 +236,20 @@ void
 AES_encrypt(const unsigned char *in, unsigned char *out, const AES_KEY *key)
 {
        if (has_intel_aes_instructions()) {
-               return AES_encrypt_aesni(in, out, key);
+               AES_encrypt_aesni(in, out, key);
+               return;
        }
-       return AES_encrypt_rj(in, out, key);
+       AES_encrypt_rj(in, out, key);
 }
 
 void
 AES_decrypt(const unsigned char *in, unsigned char *out, const AES_KEY *key)
 {
        if (has_intel_aes_instructions()) {
-               return AES_decrypt_aesni(in, out, key);
+               AES_decrypt_aesni(in, out, key);
+               return;
        }
-       return AES_decrypt_rj(in, out, key);
+       AES_decrypt_rj(in, out, key);
 }
 
 #endif /* SAMBA_RIJNDAEL */