Lines Matching defs:bv
300 ber_get_stringal( BerElement *ber, struct berval **bv )
305 if ( (*bv = (struct berval *)NSLBERI_MALLOC( sizeof(struct berval) ))
314 if ( ((*bv)->bv_val = (char *)NSLBERI_MALLOC( (size_t)len + 1 ))
322 if ( ber_read( ber, (*bv)->bv_val, len ) != (ber_slen_t) len )
324 ((*bv)->bv_val)[len] = '\0';
325 (*bv)->bv_len = len;
331 if ( (*(ber->ber_decode_translate_proc))( &((*bv)->bv_val),
333 NSLBERI_FREE( (*bv)->bv_val );
336 (*bv)->bv_len = len - 1;
437 struct berval ***bv, **bvp, *bval;
547 bv = va_arg( ap, struct berval *** );
548 *bv = NULL;
554 if ( *bv == NULL ) {
555 *bv = (struct berval **)NSLBERI_MALLOC(
558 *bv = (struct berval **)NSLBERI_REALLOC(
559 *bv,
562 rc = ber_get_stringal( ber, &((*bv)[j]) );
570 (*bv)[j] = NULL;
666 bv = va_arg( ap, struct berval *** );
667 ber_bvecfree(*bv);
668 *bv = NULL;
695 ber_bvfree( struct berval *bv )
697 if ( bv != NULL ) {
698 if ( bv->bv_val != NULL ) {
699 NSLBERI_FREE( bv->bv_val );
701 NSLBERI_FREE( (char *) bv );
707 ber_bvecfree( struct berval **bv )
711 if ( bv != NULL ) {
712 for ( i = 0; bv[i] != NULL; i++ ) {
713 ber_bvfree( bv[i] );
715 NSLBERI_FREE( (char *) bv );
721 ber_bvdup( const struct berval *bv )
729 if ( bv->bv_val == NULL ) {
733 if ( (new->bv_val = (char *)NSLBERI_MALLOC( bv->bv_len + 1 ))
737 SAFEMEMCPY( new->bv_val, bv->bv_val, (size_t) bv->bv_len );
738 new->bv_val[bv->bv_len] = '\0';
739 new->bv_len = bv->bv_len;