Browse Source

requiring 'name != NULL' in find_cipher_any() doesn't make sense

Steffen Jaeckel 8 years ago
parent
commit
7f91e5ae65
1 changed files with 4 additions and 4 deletions
  1. 4 4
      src/misc/crypt/crypt_find_cipher_any.c

+ 4 - 4
src/misc/crypt/crypt_find_cipher_any.c

@@ -26,10 +26,10 @@ int find_cipher_any(const char *name, int blocklen, int keylen)
 {
    int x;
 
-   LTC_ARGCHK(name != NULL);
-
-   x = find_cipher(name);
-   if (x != -1) return x;
+   if(name != NULL) {
+      x = find_cipher(name);
+      if (x != -1) return x;
+   }
 
    LTC_MUTEX_LOCK(&ltc_cipher_mutex);
    for (x = 0; x < TAB_SIZE; x++) {