mirror of
https://github.com/samba-team/samba.git
synced 2025-01-29 21:47:30 +03:00
ldb:ldb_msg.c - use LDB result constants for checking return values
Reviewed by: Tridge Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Fri Mar 4 22:51:57 CET 2011 on sn-devel-104
This commit is contained in:
parent
dabed32ffe
commit
75706a627d
@ -890,11 +890,14 @@ int ldb_msg_rename_attr(struct ldb_message *msg, const char *attr, const char *r
|
||||
int ldb_msg_copy_attr(struct ldb_message *msg, const char *attr, const char *replace)
|
||||
{
|
||||
struct ldb_message_element *el = ldb_msg_find_element(msg, attr);
|
||||
int ret;
|
||||
|
||||
if (el == NULL) {
|
||||
return LDB_SUCCESS;
|
||||
}
|
||||
if (ldb_msg_add(msg, el, 0) != 0) {
|
||||
return LDB_ERR_OPERATIONS_ERROR;
|
||||
ret = ldb_msg_add(msg, el, 0);
|
||||
if (ret != LDB_SUCCESS) {
|
||||
return ret;
|
||||
}
|
||||
return ldb_msg_rename_attr(msg, attr, replace);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user