Browse Source

fix clang-tidy warnings: do not use else after return

Karel Miko 6 years ago
parent
commit
1301cc5d2f
2 changed files with 2 additions and 4 deletions
  1. 1 2
      src/pk/ed25519/ed25519_import.c
  2. 1 2
      src/pk/x25519/x25519_import.c

+ 1 - 2
src/pk/ed25519/ed25519_import.c

@@ -35,9 +35,8 @@ int ed25519_import(const unsigned char *in, unsigned long inlen, curve25519_key
       key->type = PK_PUBLIC;
       key->algo = PKA_ED25519;
       return CRYPT_OK;
-   } else {
-      return err;
    }
+   return err;
 }
 
 #endif

+ 1 - 2
src/pk/x25519/x25519_import.c

@@ -45,9 +45,8 @@ int x25519_import(const unsigned char *in, unsigned long inlen, curve25519_key *
       key->type = PK_PUBLIC;
       key->algo = PKA_X25519;
       return CRYPT_OK;
-   } else {
-      return err;
    }
+   return err;
 }
 
 #endif