git: 2069dce2411d - stable/12 - libsa: make env_discard() public
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 08 Oct 2021 06:11:00 UTC
The branch stable/12 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=2069dce2411d874852c7566f5adefdb1f95795dc commit 2069dce2411d874852c7566f5adefdb1f95795dc Author: Toomas Soome <tsoome@FreeBSD.org> AuthorDate: 2020-08-19 15:27:09 +0000 Commit: Kyle Evans <kevans@FreeBSD.org> CommitDate: 2021-10-08 05:24:26 +0000 libsa: make env_discard() public Allow env_discard() to be used outside environment.c (cherry picked from commit 588f0a1e29a341878ad938bb9c239431cac107ae) --- stand/libsa/environment.c | 4 +--- stand/libsa/stand.h | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/stand/libsa/environment.c b/stand/libsa/environment.c index 167dcdb26bfa..94e4a207908b 100644 --- a/stand/libsa/environment.c +++ b/stand/libsa/environment.c @@ -37,8 +37,6 @@ __FBSDID("$FreeBSD$"); #include <string.h> -static void env_discard(struct env_var *ev); - struct env_var *environ = NULL; /* @@ -194,7 +192,7 @@ unsetenv(const char *name) return (err); } -static void +void env_discard(struct env_var *ev) { if (ev->ev_prev) diff --git a/stand/libsa/stand.h b/stand/libsa/stand.h index 7f0967fb5079..c80edba48fa1 100644 --- a/stand/libsa/stand.h +++ b/stand/libsa/stand.h @@ -338,6 +338,7 @@ extern struct env_var *env_getenv(const char *name); extern int env_setenv(const char *name, int flags, const void *value, ev_sethook_t sethook, ev_unsethook_t unsethook); +extern void env_discard(struct env_var *); extern char *getenv(const char *name); extern int setenv(const char *name, const char *value, int overwrite);