From c138111a3c27863308b6552a5527a9e821a3dc11 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Sun, 17 May 2020 17:05:30 -0700 Subject: Update to rra-c-util 8.2 and C TAP Harness 4.7 Update to rra-c-util 8.2: * Implement explicit_bzero with memset if it is not available. * Reformat all C source using clang-format 10. * Work around Test::Strict not skipping .git directories. * Fix warnings with perltidy 20190601 and Perl::Critic 1.134. * Fix warnings with Clang 10, GCC 10, and the Clang static analyzer. Update to C TAP Harness 4.7: * Fix warnings with GCC 10. * Reformat all C source using clang-format 10. * Fixed malloc error checking in bstrndup. --- util/xmalloc.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'util/xmalloc.h') diff --git a/util/xmalloc.h b/util/xmalloc.h index 61f5ed1..02c5431 100644 --- a/util/xmalloc.h +++ b/util/xmalloc.h @@ -42,12 +42,12 @@ * number information for debugging error messages without the user having to * pass those in every time. */ -#define xcalloc(n, size) x_calloc((n), (size), __FILE__, __LINE__) -#define xmalloc(size) x_malloc((size), __FILE__, __LINE__) -#define xrealloc(p, size) x_realloc((p), (size), __FILE__, __LINE__) -#define xstrdup(p) x_strdup((p), __FILE__, __LINE__) -#define xstrndup(p, size) x_strndup((p), (size), __FILE__, __LINE__) -#define xvasprintf(p, f, a) x_vasprintf((p), (f), (a), __FILE__, __LINE__) +#define xcalloc(n, size) x_calloc((n), (size), __FILE__, __LINE__) +#define xmalloc(size) x_malloc((size), __FILE__, __LINE__) +#define xrealloc(p, size) x_realloc((p), (size), __FILE__, __LINE__) +#define xstrdup(p) x_strdup((p), __FILE__, __LINE__) +#define xstrndup(p, size) x_strndup((p), (size), __FILE__, __LINE__) +#define xvasprintf(p, f, a) x_vasprintf((p), (f), (a), __FILE__, __LINE__) #define xreallocarray(p, n, size) \ x_reallocarray((p), (n), (size), __FILE__, __LINE__) @@ -60,13 +60,13 @@ * are supported. */ #ifdef HAVE_C99_VAMACROS -# define xasprintf(p, f, ...) \ - x_asprintf((p), __FILE__, __LINE__, (f), __VA_ARGS__) +# define xasprintf(p, f, ...) \ + x_asprintf((p), __FILE__, __LINE__, (f), __VA_ARGS__) #elif HAVE_GNU_VAMACROS -# define xasprintf(p, f, args...) \ - x_asprintf((p), __FILE__, __LINE__, (f), args) +# define xasprintf(p, f, args...) \ + x_asprintf((p), __FILE__, __LINE__, (f), args) #else -# define xasprintf x_asprintf +# define xasprintf x_asprintf #endif BEGIN_DECLS -- cgit v1.2.3