summaryrefslogtreecommitdiff
path: root/wrapper.c
diff options
context:
space:
mode:
authorRamsay Jones <ramsay@ramsayjones.plus.com>2017-02-28 01:24:10 +0000
committerJunio C Hamano <gitster@pobox.com>2017-02-28 11:54:14 -0800
commit34de5e4bb0dfe1c05b57c733c2196f1ad3881a98 (patch)
tree0456f565835d47637437ee428a82e78a95cc91cc /wrapper.c
parente7e07d5a4fcc2a203d9873968ad3e6bd4d7419d7 (diff)
downloadgit-34de5e4bb0dfe1c05b57c733c2196f1ad3881a98.tar.gz
wrapper.c: remove unused git_mkstemp() function
The last caller of git_mkstemp() was removed in commit 6fec0a89 ("verify_signed_buffer: use tempfile object", 16-06-2016). Since the introduction of the 'tempfile' APIs, along with git_mkstemp_mode, it is unlikely that new callers will materialize. Remove the dead code. Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'wrapper.c')
-rw-r--r--wrapper.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/wrapper.c b/wrapper.c
index e7f1979968..1a140639f2 100644
--- a/wrapper.c
+++ b/wrapper.c
@@ -440,23 +440,6 @@ int xmkstemp(char *template)
return fd;
}
-/* git_mkstemp() - create tmp file honoring TMPDIR variable */
-int git_mkstemp(char *path, size_t len, const char *template)
-{
- const char *tmp;
- size_t n;
-
- tmp = getenv("TMPDIR");
- if (!tmp)
- tmp = "/tmp";
- n = snprintf(path, len, "%s/%s", tmp, template);
- if (len <= n) {
- errno = ENAMETOOLONG;
- return -1;
- }
- return mkstemp(path);
-}
-
/* Adapted from libiberty's mkstemp.c. */
#undef TMP_MAX