]> git.notmuchmail.org Git - notmuch/commitdiff
cppcheck: call va_end in _internal_error
authorDavid Bremner <david@tethera.net>
Sat, 26 Aug 2017 14:41:39 +0000 (11:41 -0300)
committerDavid Bremner <david@tethera.net>
Wed, 30 Aug 2017 10:12:13 +0000 (07:12 -0300)
fix for:
    util/error_util.c:38: error: va_list 'va_args' was opened but not
    closed by va_end()

This makes the code more copy-pastable, if nothing else

util/error_util.c

index 778bbd522227b73d8aaaa53df64a17e1061e2ba6..e64162c7a885e622fd591b44c9d9a2175342bbd6 100644 (file)
@@ -34,6 +34,7 @@ _internal_error (const char *format, ...)
     fprintf (stderr, "Internal error: ");
     vfprintf (stderr, format, va_args);
 
+    va_end (va_args);
     exit (1);
 }