CLEANUP: cli: remove assignments to st0 and st2 in keyword parsers
Now it's not needed anymore to set STAT_ST_INIT nor CLI_ST_CALLBACK
in the parsers, remove it in the various places.
diff --git a/src/cli.c b/src/cli.c
index 5ae8959..239a505 100644
--- a/src/cli.c
+++ b/src/cli.c
@@ -729,7 +729,6 @@
return 1;
appctx->ctx.env.var = environ;
- appctx->st2 = STAT_ST_INIT;
if (*args[2]) {
int len = strlen(args[2]);
diff --git a/src/dns.c b/src/dns.c
index e29c3e4..1e286ff 100644
--- a/src/dns.c
+++ b/src/dns.c
@@ -1286,10 +1286,7 @@
return 1;
}
}
-
- appctx->st2 = STAT_ST_INIT;
return 1;
-
}
/* This function dumps counters from all resolvers section and associated name servers.
diff --git a/src/map.c b/src/map.c
index 71d480c..b6fce4d 100644
--- a/src/map.c
+++ b/src/map.c
@@ -597,8 +597,6 @@
/* no parameter: display all map available */
if (!*args[2]) {
- appctx->st2 = STAT_ST_INIT;
- appctx->st0 = CLI_ST_CALLBACK;
appctx->io_handler = cli_io_handler_pats_list;
return 0;
}
@@ -614,8 +612,6 @@
appctx->st0 = CLI_ST_PRINT;
return 1;
}
- appctx->st2 = STAT_ST_INIT;
- appctx->st0 = CLI_ST_CALLBACK;
appctx->io_handler = cli_io_handler_pat_list;
return 0;
}
diff --git a/src/proto_http.c b/src/proto_http.c
index a792fcf..cc07f01 100644
--- a/src/proto_http.c
+++ b/src/proto_http.c
@@ -12839,7 +12839,6 @@
else
appctx->ctx.errors.iid = -1;
appctx->ctx.errors.px = NULL;
- appctx->st2 = STAT_ST_INIT;
return 0;
}
diff --git a/src/ssl_sock.c b/src/ssl_sock.c
index cf2f855..8429324 100644
--- a/src/ssl_sock.c
+++ b/src/ssl_sock.c
@@ -6139,10 +6139,7 @@
/* no parameter, shows only file list */
if (!*args[2]) {
appctx->ctx.tlskeys.dump_all = 1;
- appctx->st2 = STAT_ST_INIT;
- appctx->st0 = CLI_ST_CALLBACK;
appctx->io_handler = cli_io_handler_tlskeys_files;
-
return 1;
}
@@ -6152,14 +6149,12 @@
appctx->ctx.tlskeys.dump_all = 1;
} else {
appctx->ctx.tlskeys.ref = tlskeys_ref_lookup_ref(args[2]);
- if(!appctx->ctx.tlskeys.ref) {
+ if (!appctx->ctx.tlskeys.ref) {
appctx->ctx.cli.msg = "'show tls-keys' unable to locate referenced filename\n";
appctx->st0 = CLI_ST_PRINT;
return 1;
}
}
- appctx->st2 = STAT_ST_INIT;
- appctx->st0 = CLI_ST_CALLBACK;
appctx->io_handler = cli_io_handler_tlskeys_entries;
return 1;
}
diff --git a/src/stats.c b/src/stats.c
index 64be56c..1d5b39c 100644
--- a/src/stats.c
+++ b/src/stats.c
@@ -3096,7 +3096,6 @@
{
if (strcmp(args[2], "typed") == 0)
appctx->ctx.stats.flags |= STAT_FMT_TYPED;
- appctx->st2 = STAT_ST_INIT;
return 0;
}
@@ -3114,7 +3113,6 @@
else if (strcmp(args[2], "typed") == 0)
appctx->ctx.stats.flags |= STAT_FMT_TYPED;
- appctx->st2 = STAT_ST_INIT;
return 0;
}
diff --git a/src/stick_table.c b/src/stick_table.c
index 29017d9..c6d45ca 100644
--- a/src/stick_table.c
+++ b/src/stick_table.c
@@ -1861,7 +1861,6 @@
appctx->private = private;
appctx->ctx.table.data_type = -1;
- appctx->st2 = STAT_ST_INIT;
appctx->ctx.table.target = NULL;
appctx->ctx.table.proxy = NULL;
appctx->ctx.table.entry = NULL;
diff --git a/src/stream.c b/src/stream.c
index 8ed3047..21d12e7 100644
--- a/src/stream.c
+++ b/src/stream.c
@@ -3671,7 +3671,6 @@
static int cli_parse_show_sess(char **args, struct appctx *appctx, void *private)
{
- appctx->st2 = STAT_ST_INIT;
if (!cli_has_level(appctx, ACCESS_LVL_OPER))
return 1;