From: Howard Chu Date: Sun, 9 Dec 2001 13:57:55 +0000 (+0000) Subject: Minor strlen cleanup X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~685 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d0b1ca692ab235a23050af7a1c17146e10ac43c3;p=openldap Minor strlen cleanup --- diff --git a/servers/slapd/sasl.c b/servers/slapd/sasl.c index e3fd7fbcd7..7a3b21921f 100644 --- a/servers/slapd/sasl.c +++ b/servers/slapd/sasl.c @@ -99,9 +99,9 @@ int slap_sasl_getdn( Connection *conn, char *id, char **dnptr, int flags ) /* Blatantly anonymous ID */ - len = strlen( "anonymous" ); - if( id && !strncasecmp( id, "anonymous", len) && - ( id[len] == '\0' || id[len] == '@' ) ) { + len = sizeof( "anonymous" ) - 1; + if( id && ( id[len] == '\0' || id[len] == '@' ) && + !strncasecmp( id, "anonymous", len) ) { *dnptr = NULL; return( LDAP_SUCCESS ); }