about summary refs log tree commit diff
path: root/malloc
diff options
context:
space:
mode:
Diffstat (limited to 'malloc')
-rw-r--r--malloc/malloc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/malloc/malloc.c b/malloc/malloc.c
index 4d2169bf78..5c9e77e9ec 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -5513,7 +5513,9 @@ extern char **__libc_argv attribute_hidden;
 static void
 malloc_printerr(int action, const char *str, void *ptr)
 {
-  if (action & 1)
+  if ((action & 5) == 5)
+    __libc_message (action & 2, "%s\n", str);
+  else if (action & 1)
     {
       char buf[2 * sizeof (uintptr_t) + 1];
 
@@ -5523,8 +5525,7 @@ malloc_printerr(int action, const char *str, void *ptr)
 	*--cp = '0';
 
       __libc_message (action & 2,
-		      action & 4
-		      ? "%s\n" : "*** glibc detected *** %s: %s: 0x%s ***\n",
+		      "*** glibc detected *** %s: %s: 0x%s ***\n",
 		      __libc_argv[0] ?: "<unknown>", str, cp);
     }
   else if (action & 2)