[Pkg-shadow-commits] r3320 - in upstream/trunk: . libmisc

Nicolas FRANÇOIS nekral-guest at alioth.debian.org
Thu Jun 2 18:41:05 UTC 2011


Author: nekral-guest
Date: 2011-06-02 18:41:05 +0000 (Thu, 02 Jun 2011)
New Revision: 3320

Modified:
   upstream/trunk/ChangeLog
   upstream/trunk/libmisc/xmalloc.c
Log:
	* libmisc/xmalloc.c: Harmonize message.


Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog	2011-06-02 18:40:06 UTC (rev 3319)
+++ upstream/trunk/ChangeLog	2011-06-02 18:41:05 UTC (rev 3320)
@@ -1,3 +1,7 @@
+2011-06-02  Nicolas François  <nicolas.francois at centraliens.net>
+
+	* libmisc/xmalloc.c: Harmonize message.
+
 2011-06-02  Peter Vrabec  <pvrabec at redhat.com>
 
 	* libmisc/find_new_uid.c, libmisc/find_new_gid.c: Add missing

Modified: upstream/trunk/libmisc/xmalloc.c
===================================================================
--- upstream/trunk/libmisc/xmalloc.c	2011-06-02 18:40:06 UTC (rev 3319)
+++ upstream/trunk/libmisc/xmalloc.c	2011-06-02 18:41:05 UTC (rev 3320)
@@ -44,6 +44,7 @@
 #ident "$Id$"
 
 #include <stdio.h>
+#include <errno.h>
 #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;




More information about the Pkg-shadow-commits mailing list