summaryrefslogtreecommitdiff
path: root/wrapper.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2016-04-22 19:25:16 +0700
committerJunio C Hamano <gitster@pobox.com>2016-04-22 14:07:55 -0700
commit659488326cf6a170cd474e66f1bed6f5bc322eab (patch)
tree8fe55f35d0e4d2f52e82f70a697d8b786a768432 /wrapper.c
parent423b592a06876a90f584884d4381dcf4d41f6b3b (diff)
downloadgit-659488326cf6a170cd474e66f1bed6f5bc322eab.tar.gz
wrapper.c: delete dead function git_mkstemps()nd/remove-unused
Its last call site was replaced by mks_tempfile_ts() in 284098f (diff: use tempfile module - 2015-08-12) and there's a good chance mks_tempfile_ts will continue to successfully handle this job. Delete it. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> 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 9afc1a021c..9009f8bd3d 100644
--- a/wrapper.c
+++ b/wrapper.c
@@ -446,23 +446,6 @@ int git_mkstemp(char *path, size_t len, const char *template)
return mkstemp(path);
}
-/* git_mkstemps() - create tmp file with suffix honoring TMPDIR variable. */
-int git_mkstemps(char *path, size_t len, const char *template, int suffix_len)
-{
- 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 mkstemps(path, suffix_len);
-}
-
/* Adapted from libiberty's mkstemp.c. */
#undef TMP_MAX