summaryrefslogtreecommitdiff
path: root/localedata/tst-fmon.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 15:36:51 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2018-12-27 15:36:51 +0000
commit05fa8834c6644f12405ea713c48693bf2d1864f1 (patch)
treec6b6391884370c75972a2e432d42ebbb076a0cdf /localedata/tst-fmon.c
parent525c181a5a9a95e24d2111b7792608151a40eb84 (diff)
parent963c37d5c0eb62b38f8764b23931c0dcdd497a13 (diff)
Merge commit 'refs/top-bases/t/bigmem' into t/bigmemt/bigmem
Diffstat (limited to 'localedata/tst-fmon.c')
-rw-r--r--localedata/tst-fmon.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/localedata/tst-fmon.c b/localedata/tst-fmon.c
index 995cf9056c..2ba6595ffc 100644
--- a/localedata/tst-fmon.c
+++ b/localedata/tst-fmon.c
@@ -1,5 +1,5 @@
/* Testing the implementation of strfmon(3).
- Copyright (C) 1996-2016 Free Software Foundation, Inc.
+ Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jochen Hein <jochen.hein@delphi.central.de>, 1997.
@@ -40,7 +40,7 @@
int
main (int argc, char *argv[])
{
- char *s = malloc (201);
+ char s[200];
if (setlocale (LC_MONETARY, argv[1]) == NULL)
{
@@ -48,7 +48,7 @@ main (int argc, char *argv[])
exit (EXIT_SETLOCALE);
}
- if (strfmon (s, 200, argv[2], (double) atof (argv[3])) == -1)
+ if (strfmon (s, sizeof (s), argv[2], (double) atof (argv[3])) == -1)
{
perror ("strfmon");
exit (EXIT_STRFMON);