merged On Mon, Aug 30, 2010 at 8:05 AM, Jeff Layton <jlayton@xxxxxxxxxx> wrote: > 9fbc590860e75785bdaf8b83e48fabfe4d4f7d58 needlessly changed some "else > if" statements in decode_negTokenInit to "if's". Not only was the change > not needed, but it's less efficient than the existing code. > > When compare_oid returns true, then it's guaranteed to return false in > the other cases. Therefore, there's no reason to keep comparing it. > > Cc: Shirish Pargaonkar <shirishpargaonkar@xxxxxxxxx> > Signed-off-by: Jeff Layton <jlayton@xxxxxxxxxx> > --- > fs/cifs/asn1.c | 6 +++--- > 1 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/fs/cifs/asn1.c b/fs/cifs/asn1.c > index 21f0fbd..cfd1ce3 100644 > --- a/fs/cifs/asn1.c > +++ b/fs/cifs/asn1.c > @@ -597,13 +597,13 @@ decode_negTokenInit(unsigned char *security_blob, int length, > if (compare_oid(oid, oidlen, MSKRB5_OID, > MSKRB5_OID_LEN)) > server->sec_mskerberos = true; > - if (compare_oid(oid, oidlen, KRB5U2U_OID, > + else if (compare_oid(oid, oidlen, KRB5U2U_OID, > KRB5U2U_OID_LEN)) > server->sec_kerberosu2u = true; > - if (compare_oid(oid, oidlen, KRB5_OID, > + else if (compare_oid(oid, oidlen, KRB5_OID, > KRB5_OID_LEN)) > server->sec_kerberos = true; > - if (compare_oid(oid, oidlen, NTLMSSP_OID, > + else if (compare_oid(oid, oidlen, NTLMSSP_OID, > NTLMSSP_OID_LEN)) > server->sec_ntlmssp = true; > > -- > 1.7.2.2 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-cifs" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- Thanks, Steve -- To unsubscribe from this list: send the line "unsubscribe linux-cifs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html