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;