see if a attribute value is in the list of indexed attributes
*/
static int ldb_msg_find_idx(const struct ldb_message *msg, const char *attr,
- int *v_idx, const char *key)
+ unsigned int *v_idx, const char *key)
{
unsigned int i, j;
for (i=0;i<msg->num_elements;i++) {
const struct dn_list *dn_list,
const char * const attrs[], struct ldb_message ***res)
{
- unsigned int count = 0, i;
+ unsigned int i;
+ int count = 0;
for (i=0;i<dn_list->count;i++) {
struct ldb_message msg;
#define LTDB_PACKING_FORMAT_NODN 0x26011966
/* use a portable integer format */
-static void put_uint32(uint8_t *p, int ofs, unsigned int val)
+static void put_uint32(char *p, int ofs, unsigned int val)
{
p += ofs;
p[0] = val&0xFF;
p[3] = (val>>24) & 0xFF;
}
-static unsigned int pull_uint32(uint8_t *p, int ofs)
+static unsigned int pull_uint32(char *p, int ofs)
{
p += ofs;
return p[0] | (p[1]<<8) | (p[2]<<16) | (p[3]<<24);
*/
int ltdb_add_attr_results(struct ldb_module *module, struct ldb_message *msg,
const char * const attrs[],
- unsigned int *count,
+ int *count,
struct ldb_message ***res)
{
struct ldb_context *ldb = module->ldb;
const char * const attrs[], struct ldb_message ***res);
int ltdb_add_attr_results(struct ldb_module *module, struct ldb_message *msg,
const char * const attrs[],
- unsigned int *count,
+ int *count,
struct ldb_message ***res);
int ltdb_search_free(struct ldb_module *module, struct ldb_message **msgs);
int ltdb_search(struct ldb_module *module, const char *base,