[PATCH v2 03/21] path.c: move git_path() closer to similar functions git_pathdup()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx>
---
 path.c | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/path.c b/path.c
index 06863b7..08aa213 100644
--- a/path.c
+++ b/path.c
@@ -80,6 +80,19 @@ char *git_snpath(char *buf, size_t n, const char *fmt, ...)
 	return ret;
 }
 
+char *git_path(const char *fmt, ...)
+{
+	size_t len;
+	char *pathname = get_pathname(&len);
+	va_list args;
+	char *ret;
+
+	va_start(args, fmt);
+	ret = git_vsnpath(pathname, len, fmt, args);
+	va_end(args);
+	return ret;
+}
+
 char *git_pathdup(const char *fmt, ...)
 {
 	char path[PATH_MAX], *ret;
@@ -120,19 +133,6 @@ char *mkpath(const char *fmt, ...)
 	return cleanup_path(pathname);
 }
 
-char *git_path(const char *fmt, ...)
-{
-	size_t len;
-	char *pathname = get_pathname(&len);
-	va_list args;
-	char *ret;
-
-	va_start(args, fmt);
-	ret = git_vsnpath(pathname, len, fmt, args);
-	va_end(args);
-	return ret;
-}
-
 void home_config_paths(char **global, char **xdg, char *file)
 {
 	char *xdg_home = getenv("XDG_CONFIG_HOME");
-- 
1.8.5.1.77.g42c48fa

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]