aboutsummaryrefslogtreecommitdiff
path: root/util/xmalloc.c
diff options
context:
space:
mode:
authorRuss Allbery <eagle@eyrie.org>2020-05-17 17:05:30 -0700
committerRuss Allbery <eagle@eyrie.org>2020-05-17 17:05:30 -0700
commitc138111a3c27863308b6552a5527a9e821a3dc11 (patch)
treefe3c16462bf0213708f20d251a63e5b9bbf2d23f /util/xmalloc.c
parentccfbd34d597318215b979338c4cb5d7e4a3f0d6f (diff)
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.
Diffstat (limited to 'util/xmalloc.c')
-rw-r--r--util/xmalloc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/util/xmalloc.c b/util/xmalloc.c
index f5cacc3..e8a9a82 100644
--- a/util/xmalloc.c
+++ b/util/xmalloc.c
@@ -101,8 +101,8 @@ void
xmalloc_fail(const char *function, size_t size, const char *file, int line)
{
if (size == 0)
- sysdie("failed to format output with %s at %s line %d", function,
- file, line);
+ sysdie("failed to format output with %s at %s line %d", function, file,
+ line);
else
sysdie("failed to %s %lu bytes at %s line %d", function,
(unsigned long) size, file, line);
@@ -202,7 +202,7 @@ x_strndup(const char *s, size_t size, const char *file, int line)
char *copy;
/* Don't assume that the source string is nul-terminated. */
- for (p = s; (size_t) (p - s) < size && *p != '\0'; p++)
+ for (p = s; (size_t)(p - s) < size && *p != '\0'; p++)
;
length = p - s;
copy = malloc(length + 1);
@@ -262,7 +262,7 @@ x_asprintf(char **strp, const char *file, int line, const char *fmt, ...)
}
va_end(args);
}
-#else /* !(HAVE_C99_VAMACROS || HAVE_GNU_VAMACROS) */
+#else /* !(HAVE_C99_VAMACROS || HAVE_GNU_VAMACROS) */
void
x_asprintf(char **strp, const char *fmt, ...)
{