1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-24 21:49:29 +03:00

s3:idmap_tdb2: untangle assignment and check in idmap_tdb2_alloc_load()

Michael
This commit is contained in:
Michael Adam
2009-01-26 13:28:15 +01:00
parent e0f91c8930
commit 2c1d980abe

View File

@ -152,9 +152,8 @@ static NTSTATUS idmap_tdb2_alloc_load(void)
/* Create high water marks for group and user id */
if (((low_id = dbwrap_fetch_int32(idmap_tdb2,
HWM_USER)) == -1) ||
(low_id < idmap_tdb2_state.low_uid)) {
low_id = dbwrap_fetch_int32(idmap_tdb2, HWM_USER);
if ((low_id == -1) || (low_id < idmap_tdb2_state.low_uid)) {
if (!NT_STATUS_IS_OK(dbwrap_trans_store_int32(
idmap_tdb2, HWM_USER,
idmap_tdb2_state.low_uid))) {
@ -164,9 +163,8 @@ static NTSTATUS idmap_tdb2_alloc_load(void)
}
}
if (((low_id = dbwrap_fetch_int32(idmap_tdb2,
HWM_GROUP)) == -1) ||
(low_id < idmap_tdb2_state.low_gid)) {
low_id = dbwrap_fetch_int32(idmap_tdb2, HWM_GROUP);
if ((low_id == -1) || (low_id < idmap_tdb2_state.low_gid)) {
if (!NT_STATUS_IS_OK(dbwrap_trans_store_int32(
idmap_tdb2, HWM_GROUP,
idmap_tdb2_state.low_gid))) {