From ee0d73a2c513a11466cb206caa091c3b2b9936df Mon Sep 17 00:00:00 2001 From: Justin Stephenson Date: Tue, 20 Sep 2022 15:56:34 -0400 Subject: [PATCH] SSSCTL: Use wrapper function for analyze Reviewed-by: Iker Pedrosa Reviewed-by: Sumit Bose --- src/tools/sssctl/sssctl_logs.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/tools/sssctl/sssctl_logs.c b/src/tools/sssctl/sssctl_logs.c index 11a9a5e1e70..4102286e226 100644 --- a/src/tools/sssctl/sssctl_logs.c +++ b/src/tools/sssctl/sssctl_logs.c @@ -602,19 +602,7 @@ errno_t sssctl_analyze(struct sss_cmdline *cmdline, #endif errno_t ret; - const char **args = talloc_array_size(tool_ctx, - sizeof(char *), - cmdline->argc + 2); - if (!args) { - return ENOMEM; - } - memcpy(&args[1], cmdline->argv, sizeof(char *) * cmdline->argc); - args[0] = SSS_ANALYZE; - args[cmdline->argc + 1] = NULL; - - ret = sssctl_run_command(args); - - talloc_free(args); + ret = sssctl_wrap_command(SSS_ANALYZE, cmdline, tool_ctx, pvt); return ret; }