From: Michael Adam Date: Tue, 15 Apr 2008 15:36:11 +0000 (+0200) Subject: net conf: simplify logic in test output of net conf import. X-Git-Tag: samba-3.3.0pre1~2646 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=367c8b133b2f3e73155f20f689602909eef9827b;p=thirdparty%2Fsamba.git net conf: simplify logic in test output of net conf import. Michael --- diff --git a/source/utils/net_conf.c b/source/utils/net_conf.c index 7d1658ba94a..293485aab14 100644 --- a/source/utils/net_conf.c +++ b/source/utils/net_conf.c @@ -150,18 +150,14 @@ static WERROR import_process_service(struct smbconf_ctx *conf_ctx, TALLOC_CTX *mem_ctx = talloc_stackframe(); if (opt_testmode) { + const char *indent = ""; if (servicename != NULL) { d_printf("[%s]\n", servicename); - for (idx = 0; idx < num_params; idx++) { - d_printf("\t%s = %s\n", param_names[idx], - param_values[idx]); - } + indent = "\t"; } - else { - for (idx = 0; idx < num_params; idx++) { - d_printf("%s = %s\n", param_names[idx], - param_values[idx]); - } + for (idx = 0; idx < num_params; idx++) { + d_printf("%s%s = %s\n", indent, param_names[idx], + param_values[idx]); } d_printf("\n"); goto done;