* [patch] ecryptfs: remove check for if an array is NULL
@ 2013-07-31 9:10 Dan Carpenter
2013-09-07 0:30 ` Tyler Hicks
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2013-07-31 9:10 UTC (permalink / raw)
To: Tyler Hicks; +Cc: ecryptfs, kernel-janitors
It doesn't make sense to check if an array is NULL. The compiler just
removes the check.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
Or perhaps "if (!strlen(crypt_stat->cipher))" was intended? I'm not
very familiar with this code.
diff --git a/fs/ecryptfs/crypto.c b/fs/ecryptfs/crypto.c
index d107576..3bd35e2 100644
--- a/fs/ecryptfs/crypto.c
+++ b/fs/ecryptfs/crypto.c
@@ -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",
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch] ecryptfs: remove check for if an array is NULL
2013-07-31 9:10 [patch] ecryptfs: remove check for if an array is NULL Dan Carpenter
@ 2013-09-07 0:30 ` Tyler Hicks
0 siblings, 0 replies; 2+ messages in thread
From: Tyler Hicks @ 2013-09-07 0:30 UTC (permalink / raw)
To: Dan Carpenter; +Cc: ecryptfs, kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 991 bytes --]
On 2013-07-31 12:10:10, Dan Carpenter wrote:
> It doesn't make sense to check if an array is NULL. The compiler just
> removes the check.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
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
> ---
> Or perhaps "if (!strlen(crypt_stat->cipher))" was intended? I'm not
> very familiar with this code.
>
> diff --git a/fs/ecryptfs/crypto.c b/fs/ecryptfs/crypto.c
> index d107576..3bd35e2 100644
> --- a/fs/ecryptfs/crypto.c
> +++ b/fs/ecryptfs/crypto.c
> @@ -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",
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-09-07 0:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-31 9:10 [patch] ecryptfs: remove check for if an array is NULL Dan Carpenter
2013-09-07 0:30 ` Tyler Hicks
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).