aboutsummaryrefslogtreecommitdiff
path: root/util.h
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2015-01-12 12:46:56 +0000
committerDavid Gibson <david@gibson.dropbear.id.au>2015-01-13 16:28:25 +1100
commit5ef2f7c2fa16320d01b66601f9147a10a38edcee (patch)
treed40146c78cd9e6c77a0c374da15b038809cda775 /util.h
parent302fca9f4c283e1994cf0a5a9ce1cf43ca15e6d2 (diff)
downloaddtc-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.h1
1 files changed, 1 insertions, 0 deletions
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);
}