Skip to content

Commit

Permalink
Fix conversion specifiers in "Failed to {malloc,strdup}" messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
przemoc committed Sep 8, 2018
1 parent b6bf6a1 commit f8d5fc7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils.c
Expand Up @@ -74,7 +74,7 @@ xmalloc(size_t size)
{
void *result = malloc(size);
if (!result) {
msg(MSG_CRITICAL, "Failed to malloc %zi bytes\n", size);
msg(MSG_CRITICAL, "Failed to malloc %zu bytes\n", size);
exit(EXIT_FAILURE);
}
return result;
Expand All @@ -86,7 +86,7 @@ xstrdup(const char *s)
{
char *result = strdup(s);
if (!result) {
msg(MSG_CRITICAL, "Failed to strdup %zi bytes\n", strlen(s));
msg(MSG_CRITICAL, "Failed to strdup %zu bytes\n", strlen(s));
exit(EXIT_FAILURE);
}
return result;
Expand Down

0 comments on commit f8d5fc7

Please sign in to comment.