Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/path.c
diff options
context:
space:
mode:
Diffstat (limited to 'path.c')
-rw-r--r--path.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/path.c b/path.c
index 9eb5333eed..741ae77ac1 100644
--- a/path.c
+++ b/path.c
@@ -70,21 +70,22 @@ bad:
char *git_snpath(char *buf, size_t n, const char *fmt, ...)
{
+ char *ret;
va_list args;
va_start(args, fmt);
- (void)vsnpath(buf, n, fmt, args);
+ ret = vsnpath(buf, n, fmt, args);
va_end(args);
- return buf;
+ return ret;
}
char *git_pathdup(const char *fmt, ...)
{
- char path[PATH_MAX];
+ char path[PATH_MAX], *ret;
va_list args;
va_start(args, fmt);
- (void)vsnpath(path, sizeof(path), fmt, args);
+ ret = vsnpath(path, sizeof(path), fmt, args);
va_end(args);
- return xstrdup(path);
+ return xstrdup(ret);
}
char *mkpathdup(const char *fmt, ...)