]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
registry: untangle assignment and if-statement in regdb_init().
authorMichael Adam <obnox@samba.org>
Thu, 20 Mar 2008 13:24:12 +0000 (14:24 +0100)
committerMichael Adam <obnox@samba.org>
Thu, 20 Mar 2008 14:01:52 +0000 (15:01 +0100)
Michael

source/registry/reg_backend_db.c

index 04b01797f7216a97d7a529dae4e7140850522e26..a86edf0ff9a20fc1120d479482a61aa33dc852f4 100644 (file)
@@ -329,8 +329,8 @@ bool regdb_init( void )
                return true;
        }
 
-       if ( !(regdb = db_open(NULL, state_path("registry.tdb"), 0, REG_TDB_FLAGS, O_RDWR, 0600)) )
-       {
+       regdb = db_open(NULL, state_path("registry.tdb"), 0, REG_TDB_FLAGS, O_RDWR, 0600);
+       if (!regdb) {
                regdb = db_open(NULL, state_path("registry.tdb"), 0, REG_TDB_FLAGS, O_RDWR|O_CREAT, 0600);
                if ( !regdb ) {
                        DEBUG(0,("regdb_init: Failed to open registry %s (%s)\n",