s3:net registry import: reduce indentation
authorMichael Adam <obnox@samba.org>
Tue, 26 Jun 2012 13:12:28 +0000 (15:12 +0200)
committerMichael Adam <obnox@samba.org>
Tue, 26 Jun 2012 17:57:19 +0000 (19:57 +0200)
Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>

source3/utils/net_registry.c

index 803e12181b6843ba2681fed81f12540d360323b5..d12e5879a553685e3c19674cdd4bbc55c2247d07 100644 (file)
@@ -1298,13 +1298,14 @@ static int net_registry_import(struct net_context *c, int argc,
        if (ret < 0) {
                d_printf("Transaction canceled!\n");
                regdb_transaction_cancel();
-       } else {
-               werr = regdb_transaction_commit();
-               if (!W_ERROR_IS_OK(werr)) {
-                       d_printf("Failed to commit transaction on regdb: %s\n",
-                                win_errstr(werr));
-                       ret = -1;
-               }
+               goto done;
+       }
+
+       werr = regdb_transaction_commit();
+       if (!W_ERROR_IS_OK(werr)) {
+               d_printf("Failed to commit transaction on regdb: %s\n",
+                        win_errstr(werr));
+               ret = -1;
        }
 
 done: