From 62537aaa1712773d70487e64a4017e4c02ae387c Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Sun, 26 Oct 2003 04:04:12 +0000 Subject: [PATCH] Preserve the constness of the value argument passed to env_setenv() as it gets passed through the filter functions. --- lib/libstand/environment.c | 2 +- lib/libstand/stand.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/libstand/environment.c b/lib/libstand/environment.c index 1365a1c601d4..1a3cfc7e5fef 100644 --- a/lib/libstand/environment.c +++ b/lib/libstand/environment.c @@ -207,7 +207,7 @@ env_discard(struct env_var *ev) } int -env_noset(struct env_var *ev, int flags, void *value) +env_noset(struct env_var *ev, int flags, const void *value) { return(EPERM); } diff --git a/lib/libstand/stand.h b/lib/libstand/stand.h index e08c5bb27c20..bf4ed289bba5 100644 --- a/lib/libstand/stand.h +++ b/lib/libstand/stand.h @@ -291,7 +291,8 @@ extern int pager_file(const char *fname); struct env_var; typedef char *(ev_format_t)(struct env_var *ev); -typedef int (ev_sethook_t)(struct env_var *ev, int flags, void *value); +typedef int (ev_sethook_t)(struct env_var *ev, int flags, + const void *value); typedef int (ev_unsethook_t)(struct env_var *ev); struct env_var