diff --git a/src/include/options.h b/src/include/options.h index 4555b88..a06fdf4 100644 --- a/src/include/options.h +++ b/src/include/options.h @@ -56,7 +56,7 @@ struct opts_s { /* structure describing run-time options */ /*@keep@*/ /*@null@*/ char *format; /* output format, if any */ /*@keep@*/ /*@null@*/ char *pidfile; /* PID file, if any */ unsigned int argc; /* number of non-option arguments */ - /*@keep@*/ /*@null@*/ char **argv; /* array of non-option arguments */ + /*@keep@*/ /*@null@*/ const char **argv; /* array of non-option arguments */ unsigned int argv_length; /* allocated array size */ }; @@ -65,7 +65,7 @@ struct opts_s { /* structure describing run-time options */ extern /*@null@*/ /*@only@*/ opts_t opts_parse(unsigned int, char **); extern void opts_free(/*@only@*/ opts_t); -extern bool opts_add_file(opts_t, char *); +extern bool opts_add_file(opts_t, const char *); #ifdef __cplusplus } diff --git a/src/main/options.c b/src/main/options.c index d079cad..53a7494 100644 --- a/src/main/options.c +++ b/src/main/options.c @@ -88,7 +88,7 @@ void opts_free( /*@only@ */ opts_t opts) * Add a filename to the list of non-option arguments, returning false on * error. The filename is not copied - the pointer is stored. */ -bool opts_add_file(opts_t opts, char *filename) +bool opts_add_file(opts_t opts, const char *filename) { /*@-branchstate@ */ if ((opts->argc >= opts->argv_length) || (NULL == opts->argv)) {