Skip to contentSkip to conversation

net/sunrpc/auth_gss/gss_krb5_crypto.c: Use normal negative error value return

PATCH In review Joe Perches 3 participants 3 messages Nov 15, 2010 – Dec 14, 2010

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/sunrpc/auth_gss/gss_krb5_crypto.c: Use normal negative error value return

And remove unnecessary double semicolon too.

No effect to code, as test is != 0.

---
 net/sunrpc/auth_gss/gss_krb5_crypto.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/sunrpc/auth_gss/gss_krb5_crypto.c +1 -1
index 75ee993..9576f35 100644
@@ -137,7 +137,7 @@ arcfour_hmac_md5_usage_to_salt(unsigned int usage, u8 salt[4])
 		ms_usage = 13;
 		break;
 	default:
-		return EINVAL;;
+		return -EINVAL;
 	}
 	salt[0] = (ms_usage >> 0) & 0xff;
 	salt[1] = (ms_usage >> 8) & 0xff;
#1 lore raw
Quoted 3 lines · Joe Perches

And remove unnecessary double semicolon too.

No effect to code, as test is != 0.

Hm, the error return's actually ignored. But OK. Applying to my tree for 2.6.38 assuming nobody else has picked it up.

--b.

Quoted 13 lines
---
 net/sunrpc/auth_gss/gss_krb5_crypto.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/sunrpc/auth_gss/gss_krb5_crypto.c +0 -0
index 75ee993..9576f35 100644

net/sunrpc/auth_gss/gss_krb5_crypto.c arcfour_hmac_md5_usage_to_salt(unsigned int usage, u8 salt[4]) · line 143

Quoted 8 lines
net/sunrpc/auth_gss/gss_krb5_crypto.c +1 -1
@@ -137,7 +137,7 @@ arcfour_hmac_md5_usage_to_salt(unsigned int usage, u8 salt[4])
 		ms_usage = 13;
 		break;
 	default:
-		return EINVAL;;
+		return -EINVAL;
 	}
 	salt[0] = (ms_usage >> 0) & 0xff;
 	salt[1] = (ms_usage >> 8) & 0xff;

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
Quoted 7 lines · J. Bruce Fields
Quoted 3 lines · Joe Perches

And remove unnecessary double semicolon too.

No effect to code, as test is != 0.

Hm, the error return's actually ignored. But OK. Applying to my tree for 2.6.38 assuming nobody else has picked it up.

There are also gems such as

u32 ret = -EINVAL;

Cheers
Trond

Signature · 11 lines
Trond Myklebust
Linux NFS client maintainer

NetApp
[email protected]
www.netapp.com

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html