summaryrefslogtreecommitdiff
path: root/lib/dbwrap
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2017-07-26 15:14:51 +0200
committerJeremy Allison <jra@samba.org>2017-08-16 00:27:10 +0200
commitff0eed62d3334cd720122d97e38df9cf8651acc7 (patch)
treef0b4cf7bcf57d9cbf749c370d87f6ab8f0aef1d0 /lib/dbwrap
parentef2de247c1d0887283cb8dfc25d9e48252a2c9e2 (diff)
downloadsamba-ff0eed62d3334cd720122d97e38df9cf8651acc7.tar.gz
dbwrap: Simplify dbwrap_unmarshall_fn
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'lib/dbwrap')
-rw-r--r--lib/dbwrap/dbwrap_util.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/lib/dbwrap/dbwrap_util.c b/lib/dbwrap/dbwrap_util.c
index cb98d742186..df6dea40097 100644
--- a/lib/dbwrap/dbwrap_util.c
+++ b/lib/dbwrap/dbwrap_util.c
@@ -709,22 +709,12 @@ static bool dbwrap_unmarshall_fn(TDB_DATA key, TDB_DATA value,
void *private_data)
{
struct dbwrap_unmarshall_state *state = private_data;
- struct db_record *rec;
NTSTATUS status;
- rec = dbwrap_fetch_locked(state->db, state->db, key);
- if (rec == NULL) {
- DEBUG(10, ("%s: dbwrap_fetch_locked failed\n",
- __func__));
- state->ret = NT_STATUS_NO_MEMORY;
- return false;
- }
-
- status = dbwrap_record_store(rec, value, 0);
- TALLOC_FREE(rec);
+ status = dbwrap_store(state->db, key, value, 0);
if (!NT_STATUS_IS_OK(status)) {
- DEBUG(10, ("%s: dbwrap_record_store failed: %s\n",
- __func__, nt_errstr(status)));
+ DBG_DEBUG("dbwrap_record_store failed: %s\n",
+ nt_errstr(status));
state->ret = status;
return false;
}