diff options
author | peter <peter@FreeBSD.org> | 2003-10-26 04:04:12 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2003-10-26 04:04:12 +0000 |
commit | 92983ccab19b2e63090924c93cb910e8d2f48bc7 (patch) | |
tree | 0d5a95f8a418dbee21dc0405d0df8d3906a073c6 | |
parent | cb29a24d260607a76677a4763c1bd66820daed06 (diff) | |
download | FreeBSD-src-92983ccab19b2e63090924c93cb910e8d2f48bc7.zip FreeBSD-src-92983ccab19b2e63090924c93cb910e8d2f48bc7.tar.gz |
Preserve the constness of the value argument passed to env_setenv() as
it gets passed through the filter functions.
-rw-r--r-- | lib/libstand/environment.c | 2 | ||||
-rw-r--r-- | 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 1365a1c..1a3cfc7 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 e08c5bb..bf4ed28 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 |