[monitoring-plugins] changed filename in cmd_file_read to const char * ...
Andreas Baumann
git at monitoring-plugins.org
Fri May 9 10:50:11 CEST 2025
Module: monitoring-plugins
Branch: fix_check_apt_const_char
Commit: ec47bbbda6b99f0efc1801a424812a4dd457f9b6
Author: Andreas Baumann <mail at andreasbaumann.cc>
Date: Fri May 9 10:49:02 2025 +0200
URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=ec47bbbd
changed filename in cmd_file_read to const char * (check_apt warning)
---
lib/utils_cmd.c | 2 +-
lib/utils_cmd.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/utils_cmd.c b/lib/utils_cmd.c
index 18350ac0..9b222409 100644
--- a/lib/utils_cmd.c
+++ b/lib/utils_cmd.c
@@ -346,7 +346,7 @@ int cmd_run_array(char *const *argv, output *out, output *err, int flags) {
return _cmd_close(fd);
}
-int cmd_file_read(char *filename, output *out, int flags) {
+int cmd_file_read(const char *filename, output *out, int flags) {
int fd;
if (out)
memset(out, 0, sizeof(output));
diff --git a/lib/utils_cmd.h b/lib/utils_cmd.h
index d00069c9..728ece23 100644
--- a/lib/utils_cmd.h
+++ b/lib/utils_cmd.h
@@ -20,7 +20,7 @@ typedef struct output output;
/** prototypes **/
int cmd_run(const char *, output *, output *, int);
int cmd_run_array(char *const *, output *, output *, int);
-int cmd_file_read(char *, output *, int);
+int cmd_file_read(const char *, output *, int);
/* only multi-threaded plugins need to bother with this */
void cmd_init(void);
More information about the Commits
mailing list