wrapper: remove xunsetenv()
Remove the unused wrapper function. Reported-by: Randall S. Becker <rsbecker@nexbridge.com> Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Carlo Marcelo Arenas Belón committed
Oct 29, 2021 at 14:27 UTC
6fc527a8d05141335799f27bfbaab28c8625c31b
2 files changed
-7
git-compat-util.h
-1
@@ -879,7 +879,6 @@ char *xstrndup(const char *str, size_t len);
879
void *xrealloc(void *ptr, size_t size);
880
void *xcalloc(size_t nmemb, size_t size);
881
void xsetenv(const char *name, const char *value, int overwrite);
882
-void xunsetenv(const char *name);
882
void *xmmap(void *start, size_t length, int prot, int flags, int fd, off_t offset);
883
const char *mmap_os_err(void);
884
void *xmmap_gently(void *start, size_t length, int prot, int flags, int fd, off_t offset);
wrapper.c
-6
@@ -151,12 +151,6 @@ void xsetenv(const char *name, const char *value, int overwrite)
151
die_errno(_("could not setenv '%s'"), name ? name : "(null)");
152
}
153
154
-void xunsetenv(const char *name)
155
-{
156
- if (!unsetenv(name))
157
- die_errno(_("could not unsetenv '%s'"), name ? name : "(null)");
158
-}
159
-
154
/*
155
* Limit size of IO chunks, because huge chunks only cause pain. OS X
156
* 64-bit is buggy, returning EINVAL if len >= INT_MAX; and even in