]> git.ipfire.org Git - thirdparty/git.git/blobdiff - path.c
Start the 2.46 cycle
[thirdparty/git.git] / path.c
diff --git a/path.c b/path.c
index 8bb223c92c91c2d963ab4fefa9efb0ac7c3b026c..67229edb9c2d4c23d97b4418442992ef490cfc55 100644 (file)
--- 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);