NTSTATUS status;
uint32 low_id;
struct idmap_tdb2_context *ctx;
- bool ret;
ctx = talloc_get_type(dom->private_data, struct idmap_tdb2_context);
/* Create high water marks for group and user id */
- ret = dbwrap_fetch_uint32(ctx->db, HWM_USER, &low_id);
- if (!ret || (low_id < dom->low_id)) {
+ status = dbwrap_fetch_uint32(ctx->db, HWM_USER, &low_id);
+ if (!NT_STATUS_IS_OK(status) || (low_id < dom->low_id)) {
status = dbwrap_trans_store_uint32(ctx->db, HWM_USER,
dom->low_id);
if (!NT_STATUS_IS_OK(status)) {
}
}
- ret = dbwrap_fetch_uint32(ctx->db, HWM_GROUP, &low_id);
- if (!ret || (low_id < dom->low_id)) {
+ status = dbwrap_fetch_uint32(ctx->db, HWM_GROUP, &low_id);
+ if (!NT_STATUS_IS_OK(status) || (low_id < dom->low_id)) {
status = dbwrap_trans_store_uint32(ctx->db, HWM_GROUP,
dom->low_id);
if (!NT_STATUS_IS_OK(status)) {
NTSTATUS ret;
struct idmap_tdb2_allocate_id_context *state;
uint32_t hwm;
- bool ret2;
state = (struct idmap_tdb2_allocate_id_context *)private_data;
- ret2 = dbwrap_fetch_uint32(db, state->hwmkey, &hwm);
- if (!ret2) {
+ ret = dbwrap_fetch_uint32(db, state->hwmkey, &hwm);
+ if (!NT_STATUS_IS_OK(ret)) {
ret = NT_STATUS_INTERNAL_DB_ERROR;
goto done;
}