summaryrefslogtreecommitdiff
path: root/source3/sam
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2003-06-25 10:18:22 +0000
committerVolker Lendecke <vlendec@samba.org>2003-06-25 10:18:22 +0000
commite65b68b13195c12a33d6e1bbeca28288c19506d1 (patch)
treec758d5560f6dcd42e06ad8b80928deedf9442085 /source3/sam
parentd993c171b242bf42b35d510ab4cd32912020509e (diff)
downloadsamba-e65b68b13195c12a33d6e1bbeca28288c19506d1.tar.gz
samba-e65b68b13195c12a33d6e1bbeca28288c19506d1.tar.bz2
samba-e65b68b13195c12a33d6e1bbeca28288c19506d1.zip
Fix a warning in a DEBUG
Clean up the init a little bit, less nested if-statements. Agreed upon with Simo. Volker (This used to be commit fdcfefd7f1be55307ccd59290efd249981198e1e)
Diffstat (limited to 'source3/sam')
-rw-r--r--source3/sam/idmap_tdb.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/source3/sam/idmap_tdb.c b/source3/sam/idmap_tdb.c
index 1f53321c9b..f7f9f02003 100644
--- a/source3/sam/idmap_tdb.c
+++ b/source3/sam/idmap_tdb.c
@@ -414,7 +414,7 @@ static NTSTATUS db_idmap_init( char *params )
tdb_is_new = True;
}
- DEBUG(10,("db_idmap_init: Opening tdbfile\n", tdbfile ));
+ DEBUG(10,("db_idmap_init: Opening tdbfile %s\n", tdbfile ));
/* Open idmap repository */
if (!(idmap_tdb = tdb_open_log(tdbfile, 0,
@@ -427,20 +427,20 @@ static NTSTATUS db_idmap_init( char *params )
SAFE_FREE(tdbfile);
+ if (tdb_is_new) {
+ /* the file didn't existed before opening it, let's
+ * store idmap version as nobody else yet opened and
+ * stored it. I do not like this method but didn't
+ * found a way to understand if an opened tdb have
+ * been just created or not --- SSS */
+ tdb_store_int32(idmap_tdb, "IDMAP_VERSION", IDMAP_VERSION);
+ }
+
/* check against earlier versions */
version = tdb_fetch_int32(idmap_tdb, "IDMAP_VERSION");
if (version != IDMAP_VERSION) {
- if (tdb_is_new) {
- /* the file didn't existed before opening it, let's
- * store idmap version as nobody else yet opened and
- * stored it. I do not like this method but didn't
- * found a way to understand if an opened tdb have
- * been just created or not --- SSS */
- tdb_store_int32(idmap_tdb, "IDMAP_VERSION", IDMAP_VERSION);
- } else {
- DEBUG(0, ("idmap_init: Unable to open idmap database, it's in an old format!\n"));
- return NT_STATUS_INTERNAL_DB_ERROR;
- }
+ DEBUG(0, ("idmap_init: Unable to open idmap database, it's in an old format!\n"));
+ return NT_STATUS_INTERNAL_DB_ERROR;
}
/* Create high water marks for group and user id */