From f406d16b7b94d7a511972d8e9c1c2e4772bbca0c Mon Sep 17 00:00:00 2001 From: nekral-guest Date: Thu, 2 Jun 2011 18:41:05 +0000 Subject: [PATCH] * libmisc/xmalloc.c: Harmonize message. --- ChangeLog | 4 ++++ libmisc/xmalloc.c | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index fac8d359..b7a3290a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2011-06-02 Nicolas François + + * libmisc/xmalloc.c: Harmonize message. + 2011-06-02 Peter Vrabec * libmisc/find_new_uid.c, libmisc/find_new_gid.c: Add missing diff --git a/libmisc/xmalloc.c b/libmisc/xmalloc.c index 665de65c..41a3343c 100644 --- a/libmisc/xmalloc.c +++ b/libmisc/xmalloc.c @@ -44,6 +44,7 @@ #ident "$Id$" #include +#include #include "defines.h" #include "prototypes.h" @@ -53,7 +54,9 @@ ptr = (char *) malloc (size); if (NULL == ptr) { - (void) fprintf (stderr, _("malloc(%d) failed\n"), (int) size); + (void) fprintf (stderr, + _("%s: failed to allocate memory: %s\n"), + Prog, strerror (errno)); exit (13); } return ptr;