Sun Java System Directory Server Enterprise Edition 6.0 Developer's Guide

slapi_berval_cmp()

Compare two berval structures.

Syntax

#include "slapi-plugin.h"
int slapi_berval_cmp(const struct berval* L,const struct berval* R);

Parameters

This function takes the following parameters:

L

One of the berval structures

R

The other berval structure

Description

This function checks whether two berval structures are equivalent.

Returns

This function returns 0 if the two berval structures are equivalent. It returns a negative value if L is shorter than R, and a positive value if L is longer than R. If L and R are of the same size but their content differs, this function returns a negative value if L is less than R, or a positive value if L is greater than R, where L and R are compared as arrays of bytes.