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)
committerStefan Metzmacher <metze@samba.org>
Tue, 3 Apr 2018 14:41:09 +0000 (16:41 +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>
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 */