diff options
| author | Junio C Hamano <gitster@pobox.com> | 2017-03-10 13:24:24 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2017-03-10 13:24:24 -0800 |
| commit | fb907176de4657892682c049946ba28caed9adde (patch) | |
| tree | 2749690297dd0aaab8178b9b88a02ef5847c3cdf /wrapper.c | |
| parent | 5886e75489df639ff3ac1f9b53d2c27bd9fe8f0a (diff) | |
| parent | b2d593a7797f4f9452e46f722e181604a5582897 (diff) | |
| download | git-fb907176de4657892682c049946ba28caed9adde.tar.gz | |
Merge branch 'rj/remove-unused-mktemp'
Code cleanup.
* rj/remove-unused-mktemp:
wrapper.c: remove unused gitmkstemps() function
wrapper.c: remove unused git_mkstemp() function
Diffstat (limited to 'wrapper.c')
| -rw-r--r-- | wrapper.c | 24 |
1 files changed, 0 insertions, 24 deletions
@@ -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 @@ -531,13 +514,6 @@ int git_mkstemp_mode(char *pattern, int mode) return git_mkstemps_mode(pattern, 0, mode); } -#ifdef NO_MKSTEMPS -int gitmkstemps(char *pattern, int suffix_len) -{ - return git_mkstemps_mode(pattern, suffix_len, 0600); -} -#endif - int xmkstemp_mode(char *template, int mode) { int fd; |
