diff --git a/assert/assert-perr.c b/assert/assert-perr.c
index 80cae4d00d..83f0b3a76f 100644
--- a/assert/assert-perr.c
+++ b/assert/assert-perr.c
@@ -32,7 +32,7 @@ __assert_perror_fail (int errnum,
char errbuf[1024];
char *e = __strerror_r (errnum, errbuf, sizeof errbuf);
- __assert_fail_base (_("%s%s%s:%u: %s%sUnexpected error: %s.\n%n"),
+ __assert_fail_base (_("%s%s%s:%u: %s%sUnexpected error: %s.\n"),
e, file, line, function);
}
libc_hidden_def (__assert_perror_fail)
diff --git a/assert/assert.c b/assert/assert.c
index 47b06ec7fd..db90b8d7ef 100644
--- a/assert/assert.c
+++ b/assert/assert.c
@@ -15,24 +15,17 @@
License along with the GNU C Library; if not, see
. */
-#include
-#include
+#include
#include
#include
-#include
-#include
-#include
-#include
-#include
+#include
#include
#include
-#include
+#include
extern const char *__progname;
-#include
-#include
#define fflush(s) _IO_fflush (s)
/* This function, when passed a string containing an asserted
@@ -56,12 +49,12 @@ __assert_fail_base (const char *fmt, const char *assertion, const char *file,
FATAL_PREPARE;
#endif
- int total;
- if (__asprintf (&str, fmt,
- __progname, __progname[0] ? ": " : "",
- file, line,
- function ? function : "", function ? ": " : "",
- assertion, &total) >= 0)
+ int total = __asprintf (&str, fmt,
+ __progname, __progname[0] ? ": " : "",
+ file, line,
+ function ? function : "", function ? ": " : "",
+ assertion);
+ if (total >= 0)
{
/* Print the message. */
(void) __fxprintf (NULL, "%s", str);
@@ -129,6 +122,6 @@ void
__assert_fail (const char *assertion, const char *file, unsigned int line,
const char *function)
{
- __assert_fail_base (_("%s%s%s:%u: %s%sAssertion `%s' failed.\n%n"),
+ __assert_fail_base (_("%s%s%s:%u: %s%sAssertion `%s' failed.\n"),
assertion, file, line, function);
}
diff --git a/po/libc.pot b/po/libc.pot
index d66bd04122..c8193f53c7 100644
--- a/po/libc.pot
+++ b/po/libc.pot
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: libc 2.40.9000\n"
-"POT-Creation-Date: 2024-12-30 16:29-0300\n"
+"POT-Creation-Date: 2024-12-30 16:34-0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
@@ -102,16 +102,12 @@ msgstr ""
#: assert/assert-perr.c:35
#, c-format
-msgid ""
-"%s%s%s:%u: %s%sUnexpected error: %s.\n"
-"%n"
+msgid "%s%s%s:%u: %s%sUnexpected error: %s.\n"
msgstr ""
-#: assert/assert.c:132
+#: assert/assert.c:125
#, c-format
-msgid ""
-"%s%s%s:%u: %s%sAssertion `%s' failed.\n"
-"%n"
+msgid "%s%s%s:%u: %s%sAssertion `%s' failed.\n"
msgstr ""
#: catgets/gencat.c:111