[master] 5e6c7075e Restructure to make it easier to understand for FlexeLint
Poul-Henning Kamp
phk at FreeBSD.org
Sun Dec 19 18:14:05 UTC 2021
commit 5e6c7075e2545a03d2606fa2707a87d5ba98d4b1
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Sun Dec 19 18:01:05 2021 +0000
Restructure to make it easier to understand for FlexeLint
diff --git a/bin/varnishd/mgt/mgt_param.c b/bin/varnishd/mgt/mgt_param.c
index 7cfebcc20..176f0432b 100644
--- a/bin/varnishd/mgt/mgt_param.c
+++ b/bin/varnishd/mgt/mgt_param.c
@@ -276,9 +276,8 @@ mcf_param_show(struct cli *cli, const char * const *av, void *priv)
pp = pl->spec;
if (lfmt && show != NULL && strcmp(pp->name, show))
continue;
- if (pp->func == tweak_alias && show == NULL)
- continue;
- if (pp->func == tweak_alias && strcmp(pp->name, show))
+ if (pp->func == tweak_alias &&
+ (show == NULL || strcmp(pp->name, show)))
continue;
n++;
@@ -406,9 +405,8 @@ mcf_param_show_json(struct cli *cli, const char * const *av, void *priv)
pp = pl->spec;
if (show != NULL && strcmp(pp->name, show) != 0)
continue;
- if (pp->func == tweak_alias && show == NULL)
- continue;
- if (pp->func == tweak_alias && strcmp(pp->name, show))
+ if (pp->func == tweak_alias &&
+ (show == NULL || strcmp(pp->name, show)))
continue;
n++;
More information about the varnish-commit
mailing list