Minor strlen cleanup

This commit is contained in:
Howard Chu 2001-12-09 13:57:55 +00:00
parent ab6f9bd352
commit d0b1ca692a

View File

@ -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 );
}