ecryptfs: remove check for if an array is NULL
Subsystems (2)
PATCH 1/1 ecryptfs: remove check for if an array is NULL
It doesn't make sense to check if an array is NULL. The compiler just removes the check.
Signed-off-by Dan Carpenter <[email protected]>
---
Or perhaps "if (!strlen(crypt_stat->cipher))" was intended? I'm not very familiar with this code.
fs/ecryptfs/crypto.c +0 -4
@@ -609,10 +609,6 @@ int ecryptfs_init_crypt_ctx(struct ecryptfs_crypt_stat *crypt_stat)char *full_alg_name;int rc = -EINVAL ; -if (!crypt_stat->cipher) { -ecryptfs_printk (KERN_ERR ,"No cipher specified\n" ); - goto out; - } ecryptfs_printk(KERN_DEBUG, "Initializing cipher [%s]; strlen = [%d]; " "key_size_bits = [%zd]\n",
Quoted 4 lines · Dan Carpenter
It doesn't make sense to check if an array is NULL. The compiler just removes the check.
Signed-off-by Dan Carpenter <[email protected]>
Thanks, Dan!
I've pushed this to my next branch and it will be part of a pull request that should go out early next week.
Tyler
Quoted 19 lines
---
Or perhaps "if (!strlen(crypt_stat->cipher))" was intended? I'm not very familiar with this code.fs/ecryptfs/crypto.c +0
-4@@ -609,10 +609,6 @@ int ecryptfs_init_crypt_ctx(struct ecryptfs_crypt_stat *crypt_stat)char *full_alg_name;int rc = -EINVAL ; -if (!crypt_stat->cipher) { -ecryptfs_printk (KERN_ERR ,"No cipher specified\n" ); - goto out; - } ecryptfs_printk(KERN_DEBUG, "Initializing cipher [%s]; strlen = [%d]; " "key_size_bits = [%zd]\n",