Skip to content
Snippets Groups Projects
Commit d0b1ca69 authored by Howard Chu's avatar Howard Chu
Browse files

Minor strlen cleanup

parent ab6f9bd3
Branches
Tags
No related merge requests found
......@@ -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 );
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment