diff --git a/source4/lib/ldb/common/ldb_ldif.c b/source4/lib/ldb/common/ldb_ldif.c index 6cbd30f..424a873 100644 --- a/source4/lib/ldb/common/ldb_ldif.c +++ b/source4/lib/ldb/common/ldb_ldif.c @@ -191,19 +191,19 @@ int ldb_should_b64_encode(const struct ldb_val *val) uint8_t *p = val->data; if (val->length == 0) { - return LDB_SUCCESS; + return 0; } if (p[0] == ' ' || p[0] == ':') { - return LDB_ERR_OPERATIONS_ERROR; + return -1; } for (i=0; ilength; i++) { if (!isprint(p[i]) || p[i] == '\n') { - return LDB_ERR_OPERATIONS_ERROR; + return -1; } } - return LDB_SUCCESS; + return 0; } /* this macro is used to handle the return checking on fprintf_fn() */ diff --git a/source4/lib/ldb/modules/operational.c b/source4/lib/ldb/modules/operational.c index 716f34d..d3f0cd5 100644 --- a/source4/lib/ldb/modules/operational.c +++ b/source4/lib/ldb/modules/operational.c @@ -195,7 +195,7 @@ static int operational_callback(struct ldb_context *ldb, void *context, struct l if (ares->type == LDB_REPLY_ENTRY) { /* for each record returned post-process to add any derived attributes that have been asked for */ - if (operational_search_post_process(ac->module, ares->message, ac->attrs) != 0) { + if (operational_search_post_process(ac->module, ares->message, ac->attrs) != LDB_SUCCESS) { goto error; } }