diff options
author | Russ Allbery <eagle@eyrie.org> | 2015-08-18 21:37:08 -0700 |
---|---|---|
committer | Russ Allbery <eagle@eyrie.org> | 2015-08-18 21:37:08 -0700 |
commit | 78f5850e736cafb46940c90edfb5eaa9487655c7 (patch) | |
tree | 9d1193eff1b59e4b34abb2fe5b30bf8c16698f4d /tests/tap/messages.c | |
parent | ae0671c1201efab217605263f24b204b9ac6c089 (diff) | |
parent | b46738c29eac0e88363a305da9cb026a5a8196a9 (diff) |
Imported Upstream version 3.1
Diffstat (limited to 'tests/tap/messages.c')
-rw-r--r-- | tests/tap/messages.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/tests/tap/messages.c b/tests/tap/messages.c index 3754d18..9c28789 100644 --- a/tests/tap/messages.c +++ b/tests/tap/messages.c @@ -8,8 +8,8 @@ * The canonical version of this file is maintained in the rra-c-util package, * which can be found at <http://www.eyrie.org/~eagle/software/rra-c-util/>. * - * Copyright 2002, 2004, 2005 Russ Allbery <eagle@eyrie.org> - * Copyright 2006, 2007, 2009, 2012 + * Copyright 2002, 2004, 2005, 2015 Russ Allbery <eagle@eyrie.org> + * Copyright 2006, 2007, 2009, 2012, 2014 * The Board of Trustees of the Leland Stanford Junior University * * Permission is hereby granted, free of charge, to any person obtaining a @@ -47,7 +47,7 @@ char *errors = NULL; * An error handler that appends all errors to the errors global. Used by * error_capture. */ -static void +static void __attribute__((__format__(printf, 2, 0))) message_log_buffer(int len UNUSED, const char *fmt, va_list args, int error UNUSED) { @@ -75,10 +75,8 @@ message_log_buffer(int len UNUSED, const char *fmt, va_list args, void errors_capture(void) { - if (errors != NULL) { - free(errors); - errors = NULL; - } + free(errors); + errors = NULL; message_handlers_warn(1, message_log_buffer); message_handlers_notice(1, message_log_buffer); } |