aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/utils.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-03-18 14:46:15 +0100
committerThomas White <taw@physics.org>2020-07-29 18:42:57 +0200
commitc7ffcc9a9f224b71dc86347c8e1f7f52074d9980 (patch)
treed3471b09570090adca059710e2503e4f70b6357b /libcrystfel/src/utils.c
parent5c392bc230df0cf17624d7d82ad9a6e96c37311f (diff)
Add missing va_start/va_end
Needed even though we don't iterate the list
Diffstat (limited to 'libcrystfel/src/utils.c')
-rw-r--r--libcrystfel/src/utils.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libcrystfel/src/utils.c b/libcrystfel/src/utils.c
index afbcbf78..1da0dfca 100644
--- a/libcrystfel/src/utils.c
+++ b/libcrystfel/src/utils.c
@@ -286,7 +286,9 @@ void STATUS(const char *format, ...)
{
va_list args;
char tmp[1024];
+ va_start(args, format);
vsnprintf(tmp, 1024, format, args);
+ va_end(args);
log_msg_func(LOG_MSG_STATUS, tmp, log_msg_vp);
}
@@ -295,7 +297,9 @@ void ERROR(const char *format, ...)
{
va_list args;
char tmp[1024];
+ va_start(args, format);
vsnprintf(tmp, 1024, format, args);
+ va_end(args);
log_msg_func(LOG_MSG_ERROR, tmp, log_msg_vp);
}