Browse Source

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

Steffen Jaeckel 6 years ago
parent
commit
c971205404
2 changed files with 0 additions and 2 deletions
  1. 0 1
      src/pk/ed25519/ed25519_import.c
  2. 0 1
      src/pk/x25519/x25519_import.c

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

@@ -34,7 +34,6 @@ int ed25519_import(const unsigned char *in, unsigned long inlen, curve25519_key
    if ((err = x509_decode_subject_public_key_info(in, inlen, PKA_ED25519, key->pub, &key_len, LTC_ASN1_EOL, NULL, 0uL)) == CRYPT_OK) {
    if ((err = x509_decode_subject_public_key_info(in, inlen, PKA_ED25519, key->pub, &key_len, LTC_ASN1_EOL, NULL, 0uL)) == CRYPT_OK) {
       key->type = PK_PUBLIC;
       key->type = PK_PUBLIC;
       key->algo = PKA_ED25519;
       key->algo = PKA_ED25519;
-      return CRYPT_OK;
    }
    }
    return err;
    return err;
 }
 }

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

@@ -44,7 +44,6 @@ int x25519_import(const unsigned char *in, unsigned long inlen, curve25519_key *
    if ((err = x509_decode_subject_public_key_info(in, inlen, PKA_X25519, key->pub, &key_len, LTC_ASN1_EOL, NULL, 0uL)) == CRYPT_OK) {
    if ((err = x509_decode_subject_public_key_info(in, inlen, PKA_X25519, key->pub, &key_len, LTC_ASN1_EOL, NULL, 0uL)) == CRYPT_OK) {
       key->type = PK_PUBLIC;
       key->type = PK_PUBLIC;
       key->algo = PKA_X25519;
       key->algo = PKA_X25519;
-      return CRYPT_OK;
    }
    }
    return err;
    return err;
 }
 }