summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2025-05-09 10:49:02 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2025-05-09 10:49:02 +0200
commitec47bbbda6b99f0efc1801a424812a4dd457f9b6 (patch)
treeb12e5162207f94323448fd89e0e1ab3d97ef2703
parent22366b6958ac43e2d6d2fe63a3e880e20c4ad981 (diff)
downloadmonitoring-plugins-fix_check_apt_const_char.tar.gz
changed filename in cmd_file_read to const char * (check_apt warning)fix_check_apt_const_char
-rw-r--r--lib/utils_cmd.c2
-rw-r--r--lib/utils_cmd.h2
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) {
346 return _cmd_close(fd); 346 return _cmd_close(fd);
347} 347}
348 348
349int cmd_file_read(char *filename, output *out, int flags) { 349int cmd_file_read(const char *filename, output *out, int flags) {
350 int fd; 350 int fd;
351 if (out) 351 if (out)
352 memset(out, 0, sizeof(output)); 352 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;
20/** prototypes **/ 20/** prototypes **/
21int cmd_run(const char *, output *, output *, int); 21int cmd_run(const char *, output *, output *, int);
22int cmd_run_array(char *const *, output *, output *, int); 22int cmd_run_array(char *const *, output *, output *, int);
23int cmd_file_read(char *, output *, int); 23int cmd_file_read(const char *, output *, int);
24 24
25/* only multi-threaded plugins need to bother with this */ 25/* only multi-threaded plugins need to bother with this */
26void cmd_init(void); 26void cmd_init(void);