summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2012-06-26 13:32:40 +0200
committerMichael Adam <obnox@samba.org>2012-06-26 19:57:19 +0200
commit20e5e8ef266709378b239f0338a3ecb2d175e5a4 (patch)
tree749e23fe5c270b23841d27afe7d7c4422f2aab09 /source3
parentf9ff84b0b45c66fd2c437228791e3bcf99255dad (diff)
downloadsamba-20e5e8ef266709378b239f0338a3ecb2d175e5a4.tar.gz
samba-20e5e8ef266709378b239f0338a3ecb2d175e5a4.tar.bz2
samba-20e5e8ef266709378b239f0338a3ecb2d175e5a4.zip
s3:net registry import: reduce indentation and untangle assignment from check
in import_with_precheck_action().
Diffstat (limited to 'source3')
-rw-r--r--source3/utils/net_registry.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/source3/utils/net_registry.c b/source3/utils/net_registry.c
index 920ddc4fba..5e0e556c22 100644
--- a/source3/utils/net_registry.c
+++ b/source3/utils/net_registry.c
@@ -1241,13 +1241,18 @@ static int import_with_precheck_action(const char *import_fname,
.data = &import_ctx
};
int ret = -1;
+ bool precheck_ok;
- if (import_precheck(precheck_fname, parse_options)) {
- ret = reg_parse_file(import_fname,
- reg_import_adapter(frame, import_callback),
- parse_options);
+ precheck_ok = import_precheck(precheck_fname, parse_options);
+ if (!precheck_ok) {
+ goto done;
}
+ ret = reg_parse_file(import_fname,
+ reg_import_adapter(frame, import_callback),
+ parse_options);
+
+done:
talloc_free(frame);
return ret;
}