s3:idmap_tdb2: untangle assignment and check in idmap_tdb2_alloc_load()
authorMichael Adam <obnox@samba.org>
Mon, 26 Jan 2009 12:28:15 +0000 (13:28 +0100)
committerMichael Adam <obnox@samba.org>
Fri, 6 Feb 2009 09:20:08 +0000 (10:20 +0100)
Michael

source3/winbindd/idmap_tdb2.c

index 8c96dcafa1882f9dfed213d3b07d326e0290eb7a..fb90dd097ec53b5d447119e6454cb494a0ff8873 100644 (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))) {