From: Nguyễn Thái Ngọc Duy Date: Tue, 18 Feb 2014 13:39:53 GMT Subject: [PATCH v3 04/25] path.c: group git_path(), git_pathdup() and strbuf_git_path() together Message-ID: <1392730814-19656-5-git-send-email-pclouds@gmail.com> In-Reply-To: <1392730814-19656-1-git-send-email-pclouds@gmail.com> Signed-off-by: Nguyễn Thái Ngọc Duy --- path.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/path.c b/path.c index 635ec41..e088c40 100644 --- a/path.c +++ b/path.c @@ -78,6 +78,16 @@ void strbuf_git_path(struct strbuf *sb, const char *fmt, ...) va_end(args); } +char *git_path(const char *fmt, ...) +{ + struct strbuf *pathname = get_pathname(); + va_list args; + va_start(args, fmt); + do_git_path(pathname, fmt, args); + va_end(args); + return pathname->buf; +} + char *git_pathdup(const char *fmt, ...) { struct strbuf *path = get_pathname(); @@ -109,16 +119,6 @@ char *mkpath(const char *fmt, ...) return cleanup_path(pathname->buf); } -char *git_path(const char *fmt, ...) -{ - struct strbuf *pathname = get_pathname(); - va_list args; - va_start(args, fmt); - do_git_path(pathname, fmt, args); - va_end(args); - return pathname->buf; -} - void home_config_paths(char **global, char **xdg, char *file) { char *xdg_home = getenv("XDG_CONFIG_HOME"); -- 1.8.5.2.240.g8478abd