summaryrefslogtreecommitdiffstats
path: root/path.c
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2024-04-05 12:56:48 +0200
committerJunio C Hamano <gitster@pobox.com>2024-04-05 09:49:38 -0700
commit708f7e05907ba7d4acd08bf87f51474471a16f43 (patch)
tree46a98cfae85112f3dc2b5d060b6189120bafd444 /path.c
parent9126cb3186112f160a601e9a7eda29dd43227576 (diff)
downloadgit-708f7e05907ba7d4acd08bf87f51474471a16f43.tar.gz
git-708f7e05907ba7d4acd08bf87f51474471a16f43.zip
path: remove mksnpath()
Remove the function mksnpath(), which has become unused. Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'path.c')
-rw-r--r--path.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/path.c b/path.c
index 0fb527918b..9a62b6faae 100644
--- a/path.c
+++ b/path.c
@@ -28,8 +28,6 @@ static int get_st_mode_bits(const char *path, int *mode)
return 0;
}
-static char bad_path[] = "/bad-path/";
-
static struct strbuf *get_pathname(void)
{
static struct strbuf pathname_array[4] = {
@@ -59,21 +57,6 @@ static void strbuf_cleanup_path(struct strbuf *sb)
strbuf_remove(sb, 0, path - sb->buf);
}
-char *mksnpath(char *buf, size_t n, const char *fmt, ...)
-{
- va_list args;
- unsigned len;
-
- va_start(args, fmt);
- len = vsnprintf(buf, n, fmt, args);
- va_end(args);
- if (len >= n) {
- strlcpy(buf, bad_path, n);
- return buf;
- }
- return (char *)cleanup_path(buf);
-}
-
static int dir_prefix(const char *buf, const char *dir)
{
int len = strlen(dir);