From 3e2a5d7e047c9f658ddf05819ca0849e915712ec Mon Sep 17 00:00:00 2001 From: Vivek Kumar Dutta <vivek.dutta@iopsys.eu> Date: Wed, 20 Nov 2024 17:05:52 +0530 Subject: [PATCH] Fix flawfinder issues --- src/swmod_lxc.c | 2 +- src/tools.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/swmod_lxc.c b/src/swmod_lxc.c index 2f626ad..01e6114 100644 --- a/src/swmod_lxc.c +++ b/src/swmod_lxc.c @@ -708,7 +708,7 @@ static int lxc_attach_run_cmd(void *args) return 0; } - pp = popen(cmd, "r"); + pp = popen(cmd, "r"); // flawfinder: ignore if (pp != NULL) { char line[MAX_LEN_512] = {0}; diff --git a/src/tools.c b/src/tools.c index e3c925e..a6a395c 100644 --- a/src/tools.c +++ b/src/tools.c @@ -268,7 +268,7 @@ int run_cmd(const char *cmd, char *output, size_t out_len) // init the buffer memset(output, 0, out_len); - pp = popen(cmd, "r"); + pp = popen(cmd, "r"); // flawfinder: ignore if (pp != NULL) { char line[512] = {0}; @@ -291,7 +291,7 @@ int run_cmd_no_output(const char *cmd) if (cmd == NULL) return 0; - if (0 != system(cmd)) + if (0 != system(cmd)) // flawfinder: ignore return -1; return 0; -- GitLab