summary refs log tree commit diff
path: root/assert
diff options
context:
space:
mode:
Diffstat (limited to 'assert')
-rw-r--r--assert/assert-perr.c8
-rw-r--r--assert/assert.c8
2 files changed, 10 insertions, 6 deletions
diff --git a/assert/assert-perr.c b/assert/assert-perr.c
index 3846529a53..1144530640 100644
--- a/assert/assert-perr.c
+++ b/assert/assert-perr.c
@@ -75,9 +75,11 @@ __assert_perror_fail (int errnum,
       free (buf);
     }
   else
-    /* At least print a minimal message.  */
-#define STR_N_LEN(str) str, sizeof (str) - 1
-    __libc_write (STDERR_FILENO, STR_N_LEN ("Unexpected error.\n"));
+    {
+      /* At least print a minimal message.  */
+      static const char errstr[] = "Unexpected error.\n";
+      __libc_write (STDERR_FILENO, errstr, sizeof (errstr) - 1);
+    }
 
   abort ();
 }
diff --git a/assert/assert.c b/assert/assert.c
index 453d2af8a3..4f8fbfb130 100644
--- a/assert/assert.c
+++ b/assert/assert.c
@@ -73,9 +73,11 @@ __assert_fail (const char *assertion, const char *file, unsigned int line,
       free (buf);
     }
   else
-    /* At least print a minimal message.  */
-#define STR_N_LEN(str) str, sizeof (str) - 1
-    __libc_write (STDERR_FILENO, STR_N_LEN ("Unexpected error.\n"));
+    {
+      /* At least print a minimal message.  */
+      static const char errstr[] = "Unexpected error.\n";
+      __libc_write (STDERR_FILENO, errstr, sizeof (errstr) - 1);
+    }
 
   abort ();
 }