[Crosstoolchain-logs] [device-tree-compiler] 144/198: dtc: Use va_end to match corresponding va_start
Hector Oron
zumbi at moszumanska.debian.org
Thu Dec 8 17:07:03 UTC 2016
This is an automated email from the git hooks/post-receive script.
zumbi pushed a commit to branch upstream/1.4.x
in repository device-tree-compiler.
commit 5ef2f7c2fa16320d01b66601f9147a10a38edcee
Author: Colin Ian King <colin.king at canonical.com>
Date: Mon Jan 12 12:46:56 2015 +0000
dtc: Use va_end to match corresponding va_start
Although on some systems va_end is a no-op, it is good practice
to use va_end, especially since the manual states:
"Each invocation of va_start() must be matched by a corresponding
invocation of va_end() in the same function."
Signed-off-by: Colin Ian King <colin.king at canonical.com>
---
checks.c | 1 +
util.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/checks.c b/checks.c
index 3bf0fa4..e81a8c7 100644
--- a/checks.c
+++ b/checks.c
@@ -113,6 +113,7 @@ static inline void check_msg(struct check *c, const char *fmt, ...)
vfprintf(stderr, fmt, ap);
fprintf(stderr, "\n");
}
+ va_end(ap);
}
#define FAIL(c, ...) \
diff --git a/util.h b/util.h
index ccfdf4b..f800b60 100644
--- a/util.h
+++ b/util.h
@@ -34,6 +34,7 @@ static inline void __attribute__((noreturn)) die(const char *str, ...)
va_start(ap, str);
fprintf(stderr, "FATAL ERROR: ");
vfprintf(stderr, str, ap);
+ va_end(ap);
exit(1);
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/crosstoolchain/device-tree-compiler.git
More information about the Crosstoolchain-logs
mailing list