Skip to content

Commit 14af79b

Browse files
committed
Merge branch 'nd/remove-unused' into HEAD
Code cleanup. * nd/remove-unused: wrapper.c: delete dead function git_mkstemps() dir.c: remove dead function fnmatch_icase()
2 parents 13af774 + 6594883 commit 14af79b

File tree

4 files changed

+0
-27
lines changed

4 files changed

+0
-27
lines changed

cache.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -958,8 +958,6 @@ static inline int is_empty_blob_sha1(const unsigned char *sha1)
958958

959959
int git_mkstemp(char *path, size_t n, const char *template);
960960

961-
int git_mkstemps(char *path, size_t n, const char *template, int suffix_len);
962-
963961
/* set default permissions by passing mode arguments to open(2) */
964962
int git_mkstemps_mode(char *pattern, int suffix_len, int mode);
965963
int git_mkstemp_mode(char *pattern, int mode);

dir.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,6 @@ int strncmp_icase(const char *a, const char *b, size_t count)
6464
return ignore_case ? strncasecmp(a, b, count) : strncmp(a, b, count);
6565
}
6666

67-
int fnmatch_icase(const char *pattern, const char *string, int flags)
68-
{
69-
return wildmatch(pattern, string,
70-
flags | (ignore_case ? WM_CASEFOLD : 0),
71-
NULL);
72-
}
73-
7467
int git_fnmatch(const struct pathspec_item *item,
7568
const char *pattern, const char *string,
7669
int prefix)

dir.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,6 @@ extern int remove_path(const char *path);
272272

273273
extern int strcmp_icase(const char *a, const char *b);
274274
extern int strncmp_icase(const char *a, const char *b, size_t count);
275-
extern int fnmatch_icase(const char *pattern, const char *string, int flags);
276275

277276
/*
278277
* The prefix part of pattern must not contains wildcards.

wrapper.c

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -446,23 +446,6 @@ int git_mkstemp(char *path, size_t len, const char *template)
446446
return mkstemp(path);
447447
}
448448

449-
/* git_mkstemps() - create tmp file with suffix honoring TMPDIR variable. */
450-
int git_mkstemps(char *path, size_t len, const char *template, int suffix_len)
451-
{
452-
const char *tmp;
453-
size_t n;
454-
455-
tmp = getenv("TMPDIR");
456-
if (!tmp)
457-
tmp = "/tmp";
458-
n = snprintf(path, len, "%s/%s", tmp, template);
459-
if (len <= n) {
460-
errno = ENAMETOOLONG;
461-
return -1;
462-
}
463-
return mkstemps(path, suffix_len);
464-
}
465-
466449
/* Adapted from libiberty's mkstemp.c. */
467450

468451
#undef TMP_MAX

0 commit comments

Comments
 (0)