#define ber_strccmp(s,c) \
( (s)[0] == (c) && (s)[1] == '\0' )
-LBER_F( char * )
-ber_bvchr LDAP_P(( struct berval *bv, char c ));
+#define ber_bvchr(bv,c) \
+ memchr( (bv)->bv_val, (c), (bv)->bv_len )
LDAP_END_DECL
return n;
}
-char *
-ber_bvchr( struct berval *bv, char c )
-{
- ber_len_t p;
-
- assert( bv );
-
- if ( bv->bv_len == 0 ) {
- return NULL;
- }
-
- assert( bv->bv_val );
-
- for ( p = 0; p < bv->bv_len; p++ ) {
- if ( bv->bv_val[ p ] == c ) {
- return &bv->bv_val[ p ];
- }
- }
-
- return NULL;
-}
-