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
diff options
context:
space:
mode:
-rw-r--r--t/helper/test-trace2.c4
-rw-r--r--usage.c8
2 files changed, 7 insertions, 5 deletions
diff --git a/t/helper/test-trace2.c b/t/helper/test-trace2.c
index 180c7f53f3..a714130ece 100644
--- a/t/helper/test-trace2.c
+++ b/t/helper/test-trace2.c
@@ -224,8 +224,8 @@ static int ut_009bug_BUG(int argc, const char **argv)
static int ut_010bug_BUG(int argc, const char **argv)
{
- bug("a bug message");
- BUG("a BUG message");
+ bug("a %s message", "bug");
+ BUG("a %s message", "BUG");
}
/*
diff --git a/usage.c b/usage.c
index 79900d0287..56e29d6cd6 100644
--- a/usage.c
+++ b/usage.c
@@ -334,15 +334,17 @@ NORETURN void BUG_fl(const char *file, int line, const char *fmt, ...)
int bug_called_must_BUG;
void bug_fl(const char *file, int line, const char *fmt, ...)
{
- va_list ap, cp;
+ va_list ap;
bug_called_must_BUG = 1;
- va_copy(cp, ap);
va_start(ap, fmt);
BUG_vfl_common(file, line, fmt, ap);
va_end(ap);
- trace2_cmd_error_va(fmt, cp);
+
+ va_start(ap, fmt);
+ trace2_cmd_error_va(fmt, ap);
+ va_end(ap);
}
#ifdef SUPPRESS_ANNOTATED_LEAKS