aboutsummaryrefslogtreecommitdiff
path: root/stdlib/tst-fmtmsg.c
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/tst-fmtmsg.c')
-rw-r--r--stdlib/tst-fmtmsg.c32
1 files changed, 1 insertions, 31 deletions
diff --git a/stdlib/tst-fmtmsg.c b/stdlib/tst-fmtmsg.c
index c3748d64d5..d5369bda62 100644
--- a/stdlib/tst-fmtmsg.c
+++ b/stdlib/tst-fmtmsg.c
@@ -1,8 +1,6 @@
#include <fmtmsg.h>
#include <mcheck.h>
#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
#define MM_TEST 10
@@ -14,13 +12,11 @@ main (void)
mtrace ();
- char TEST[] = "ABCD";
- if (addseverity (MM_TEST, TEST) != MM_OK)
+ if (addseverity (MM_TEST, "TEST") != MM_OK)
{
puts ("addseverity failed");
result = 1;
}
- strcpy (TEST, "TEST");
if (fmtmsg (MM_PRINT, "GLIBC:tst-fmtmsg", MM_HALT, "halt",
"should print message for MM_HALT", "GLIBC:tst-fmtmsg:1")
@@ -52,31 +48,5 @@ main (void)
!= MM_OK)
result = 1;
- if (addseverity (MM_TEST, NULL) != MM_OK)
- {
- puts ("second addseverity failed");
- result = 1;
- }
-
- if (addseverity (MM_TEST, NULL) != MM_NOTOK)
- {
- puts ("third addseverity unexpectedly succeeded");
- result = 1;
- }
-
- char *p = strdup ("TEST2");
- if (addseverity (MM_TEST, p) != MM_OK)
- {
- puts ("fourth addseverity failed");
- result = 1;
- }
- if (addseverity (MM_TEST, "TEST3") != MM_OK)
- {
- puts ("fifth addseverity failed");
- result = 1;
- }
-
- free (p);
-
return result;
}