summaryrefslogtreecommitdiff
path: root/source3/winbindd/idmap_tdb2.c
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2009-07-29 14:16:11 +0200
committerMichael Adam <obnox@samba.org>2009-07-29 16:26:21 +0200
commitded0ce8345b99e9d5e0cfaea7cee58648baea4b7 (patch)
treedb3b9a8af509bef9f3e68ab433be9a7971beae50 /source3/winbindd/idmap_tdb2.c
parentd916e56c4c9dc729dc88418f75ebbbf943597476 (diff)
downloadsamba-ded0ce8345b99e9d5e0cfaea7cee58648baea4b7.tar.gz
samba-ded0ce8345b99e9d5e0cfaea7cee58648baea4b7.tar.bz2
samba-ded0ce8345b99e9d5e0cfaea7cee58648baea4b7.zip
s3:dbwrap: change dbwrap_change_uint32_atomic() to return NTSTATUS not uint32_t.
Michael
Diffstat (limited to 'source3/winbindd/idmap_tdb2.c')
-rw-r--r--source3/winbindd/idmap_tdb2.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/source3/winbindd/idmap_tdb2.c b/source3/winbindd/idmap_tdb2.c
index 92e1db8460..8178fa0080 100644
--- a/source3/winbindd/idmap_tdb2.c
+++ b/source3/winbindd/idmap_tdb2.c
@@ -205,7 +205,6 @@ static NTSTATUS idmap_tdb2_allocate_id_action(struct db_context *db,
void *private_data)
{
NTSTATUS ret;
- uint32_t res;
struct idmap_tdb2_allocate_id_context *state;
uint32_t hwm;
@@ -226,11 +225,10 @@ static NTSTATUS idmap_tdb2_allocate_id_action(struct db_context *db,
}
/* fetch a new id and increment it */
- res = dbwrap_change_uint32_atomic(db, state->hwmkey, &hwm, 1);
- if (res == -1) {
+ ret = dbwrap_change_uint32_atomic(db, state->hwmkey, &hwm, 1);
+ if (!NT_STATUS_IS_OK(ret)) {
DEBUG(1, ("Fatal error while fetching a new %s value\n!",
state->hwmtype));
- ret = NT_STATUS_UNSUCCESSFUL;
goto done;
}