diff options
author | Colin Ian King <colin.king@canonical.com> | 2015-01-12 12:46:56 +0000 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2015-01-13 16:28:25 +1100 |
commit | 5ef2f7c2fa16320d01b66601f9147a10a38edcee (patch) | |
tree | d40146c78cd9e6c77a0c374da15b038809cda775 /util.h | |
parent | 302fca9f4c283e1994cf0a5a9ce1cf43ca15e6d2 (diff) | |
download | dtc-5ef2f7c2fa16320d01b66601f9147a10a38edcee.tar.gz |
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@canonical.com>
Diffstat (limited to 'util.h')
-rw-r--r-- | util.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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); } |