summaryrefslogtreecommitdiff
path: root/source4/lib/ldb
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2009-10-17 22:26:41 +0200
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2009-10-18 10:45:30 +0200
commit56a8baff3df6a5120b6c7bbca771dfb7c6934fd5 (patch)
tree2c58d40ad619b55228abc0715cbf0aca8b1fc42a /source4/lib/ldb
parenta69f84fd2a4e410dffdca8b8ba08f803d3d07de6 (diff)
downloadsamba-56a8baff3df6a5120b6c7bbca771dfb7c6934fd5.tar.gz
samba-56a8baff3df6a5120b6c7bbca771dfb7c6934fd5.tar.bz2
samba-56a8baff3df6a5120b6c7bbca771dfb7c6934fd5.zip
s4:ldb_msg - Use LDB constants on results
Diffstat (limited to 'source4/lib/ldb')
-rw-r--r--source4/lib/ldb/common/ldb_msg.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/source4/lib/ldb/common/ldb_msg.c b/source4/lib/ldb/common/ldb_msg.c
index 929f24cd88..09173253d0 100644
--- a/source4/lib/ldb/common/ldb_msg.c
+++ b/source4/lib/ldb/common/ldb_msg.c
@@ -896,14 +896,16 @@ int ldb_msg_check_string_attribute(const struct ldb_message *msg, const char *na
struct ldb_val val;
el = ldb_msg_find_element(msg, name);
- if (el == NULL)
- return 0;
+ if (el == NULL) {
+ return LDB_SUCCESS;
+ }
val.data = discard_const_p(uint8_t, value);
val.length = strlen(value);
- if (ldb_msg_find_val(el, &val))
- return 1;
+ if (ldb_msg_find_val(el, &val)) {
+ return LDB_ERR_OPERATIONS_ERROR;
+ }
- return 0;
+ return LDB_SUCCESS;
}