From bd04a914bcdded28070d60e3ea295eed7f7ce17f Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Fri, 8 Dec 2017 19:57:11 +0000 Subject: [PATCH] Const poison a couple of interfaces. Obtained from: lua boot project Sponsored by: Netflix --- stand/common/bootstrap.h | 4 ++-- stand/common/interp_backslash.c | 2 +- stand/common/interp_parse.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/stand/common/bootstrap.h b/stand/common/bootstrap.h index 2234e05e67e5..5d6a63db2b11 100644 --- a/stand/common/bootstrap.h +++ b/stand/common/bootstrap.h @@ -49,10 +49,10 @@ void interact(const char *rc); int include(const char *filename); /* interp_backslash.c */ -char *backslash(char *str); +char *backslash(const char *str); /* interp_parse.c */ -int parse(int *argc, char ***argv, char *str); +int parse(int *argc, char ***argv, const char *str); /* interp_forth.c */ void bf_init(const char *rc); diff --git a/stand/common/interp_backslash.c b/stand/common/interp_backslash.c index 09b8f57bf029..30874bdf8952 100644 --- a/stand/common/interp_backslash.c +++ b/stand/common/interp_backslash.c @@ -28,7 +28,7 @@ __FBSDID("$FreeBSD$"); * processing" done on it. Original can be free'd if desired. */ char * -backslash(char *str) +backslash(const char *str) { /* * Remove backslashes from the strings. Turn \040 etc. into a single diff --git a/stand/common/interp_parse.c b/stand/common/interp_parse.c index 8d8a2e290983..670273e490e5 100644 --- a/stand/common/interp_parse.c +++ b/stand/common/interp_parse.c @@ -7,7 +7,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * + * * Jordan K. Hubbard * 29 August 1998 * @@ -82,7 +82,7 @@ isdquote(int ch) } int -parse(int *argc, char ***argv, char *str) +parse(int *argc, char ***argv, const char *str) { int ac; char *val, *p, *q, *copy = NULL;