Skip to contentSkip to conversation

eCryptfs: add a semicolon

PATCH In review [email protected] 3 participants 3 messages Nov 27, 2020 – Jan 30, 2021 Ecrypt file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 eCryptfs: add a semicolon

From: Tom Rix <[email protected]>

Function like macros should have a semicolon.

---
 fs/ecryptfs/keystore.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ecryptfs/keystore.c +1 -1
index f6a17d259db7..2abd219cfeec 100644
@@ -1172,7 +1172,7 @@ decrypt_pki_encrypted_session_key(struct ecryptfs_auth_tok *auth_tok,
 	rc = ecryptfs_cipher_code_to_string(crypt_stat->cipher, cipher_code);
 	if (rc) {
 		ecryptfs_printk(KERN_ERR, "Cipher code [%d] is invalid\n",
-				cipher_code)
+				cipher_code);
 		goto out;
 	}
 	crypt_stat->flags |= ECRYPTFS_KEY_VALID;
Signature · 1 line
2.18.4
#1 lore raw
Quoted 1 line · On Fri, 2020-11-27 at 08:05 -0800, [email protected] wrote:

Function like macros should have a semicolon.

[]

fs/ecryptfs/keystore.c

Quoted 1 line
fs/ecryptfs/keystore.c +0 -0

[]

fs/ecryptfs/keystore.c decrypt_pki_encrypted_session_key(struct ecryptfs_auth_tok *auth_tok, · line 1175

Quoted 6 lines
fs/ecryptfs/keystore.c +1 -1
@@ -1172,7 +1172,7 @@ decrypt_pki_encrypted_session_key(struct ecryptfs_auth_tok *auth_tok,
  	rc = ecryptfs_cipher_code_to_string(crypt_stat->cipher, cipher_code);
  	if (rc) {
  		ecryptfs_printk(KERN_ERR, "Cipher code [%d] is invalid\n",
-				cipher_code)
+				cipher_code);

As this is the only use that does not have a semicolon, it'd be good to add the removal of the semicolon from the #define at the same time.

maintainer
#2 lore raw
Quoted 5 lines · Joe Perches
Quoted 1 line · On Fri, 2020-11-27 at 08:05 -0800, [email protected] wrote:

Function like macros should have a semicolon.

[]

fs/ecryptfs/keystore.c

Quoted 1 line
fs/ecryptfs/keystore.c +0 -0

[]

Quoted 10 lines

fs/ecryptfs/keystore.c decrypt_pki_encrypted_session_key(struct ecryptfs_auth_tok *auth_tok, · line 1175

Quoted 6 lines
fs/ecryptfs/keystore.c +1 -1
@@ -1172,7 +1172,7 @@ decrypt_pki_encrypted_session_key(struct ecryptfs_auth_tok *auth_tok,
  	rc = ecryptfs_cipher_code_to_string(crypt_stat->cipher, cipher_code);
  	if (rc) {
  		ecryptfs_printk(KERN_ERR, "Cipher code [%d] is invalid\n",
-				cipher_code)
+				cipher_code);

As this is the only use that does not have a semicolon, it'd be good to add the removal of the semicolon from the #define at the same time.

I double checked that this is the only ecryptfs_printk() usage missing the trailing semicolon and then made Joe's suggested change before pushing the patch to the eCryptfs next branch:

https://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs.git/log/?h=next

Thanks for the cleanup!

Tyler