summaryrefslogtreecommitdiff
path: root/source3/lib/dbwrap/dbwrap_util.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/dbwrap/dbwrap_util.c')
-rw-r--r--source3/lib/dbwrap/dbwrap_util.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/lib/dbwrap/dbwrap_util.c b/source3/lib/dbwrap/dbwrap_util.c
index 31beadb6a2..48bd9bb13b 100644
--- a/source3/lib/dbwrap/dbwrap_util.c
+++ b/source3/lib/dbwrap/dbwrap_util.c
@@ -98,7 +98,8 @@ NTSTATUS dbwrap_fetch_uint32(struct db_context *db, const char *keystr,
return NT_STATUS_OK;
}
-int dbwrap_store_uint32(struct db_context *db, const char *keystr, uint32_t v)
+NTSTATUS dbwrap_store_uint32(struct db_context *db, const char *keystr,
+ uint32_t v)
{
struct db_record *rec;
uint32 v_store;
@@ -106,7 +107,7 @@ int dbwrap_store_uint32(struct db_context *db, const char *keystr, uint32_t v)
rec = dbwrap_fetch_locked(db, NULL, string_term_tdb_data(keystr));
if (rec == NULL) {
- return -1;
+ return NT_STATUS_INVALID_PARAMETER;
}
SIVAL(&v_store, 0, v);
@@ -116,7 +117,7 @@ int dbwrap_store_uint32(struct db_context *db, const char *keystr, uint32_t v)
sizeof(v_store)),
TDB_REPLACE);
TALLOC_FREE(rec);
- return NT_STATUS_IS_OK(status) ? 0 : -1;
+ return status;
}
/**