summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Chancellor <natechancellor@gmail.com>2019-09-26 21:39:37 -0700
committerMichael Bestas <mkbestas@lineageos.org>2020-02-02 01:40:55 +0200
commit0b11acaba990eb32bec8b9f7b01277649bf3ab83 (patch)
tree90a4995cbc444bc389fd36e962f8ef100de401cb
parent6a31f29c4f58e5c4797528e78c769ab00f9088ff (diff)
ecryptfs: Remove two pointless NULL checks in ecryptfs_dump_cipher
Clang warns: ../fs/ecryptfs/debug.c:142:12: warning: address of array 'stat->cipher' will always evaluate to 'true' [-Wpointer-bool-conversion] if (stat->cipher) ~~ ~~~~~~^~~~~~ ../fs/ecryptfs/debug.c:146:12: warning: address of array 'stat->cipher_mode' will always evaluate to 'true' [-Wpointer-bool-conversion] if (stat->cipher_mode) ~~ ~~~~~~^~~~~~~~~~~ 2 warnings generated. Fixes: f50a4a1dc7a0 ("eCryptfs: fixed bug in cipher handling") Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
-rw-r--r--fs/ecryptfs/debug.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/fs/ecryptfs/debug.c b/fs/ecryptfs/debug.c
index 0556af1adfb7..d34a1d6b40fc 100644
--- a/fs/ecryptfs/debug.c
+++ b/fs/ecryptfs/debug.c
@@ -139,12 +139,8 @@ void ecryptfs_dump_cipher(struct ecryptfs_crypt_stat *stat)
if (!stat)
return;
- if (stat->cipher)
- ecryptfs_printk(KERN_DEBUG,
- "ecryptfs cipher is %s\n", stat->cipher);
-
- if (stat->cipher_mode)
- ecryptfs_printk(KERN_DEBUG, "ecryptfs cipher mode is %s\n",
- stat->cipher_mode);
+ ecryptfs_printk(KERN_DEBUG, "ecryptfs cipher is %s\n", stat->cipher);
+ ecryptfs_printk(KERN_DEBUG, "ecryptfs cipher mode is %s\n",
+ stat->cipher_mode);
}