diff options
Diffstat (limited to 'localedata/tst-fmon.c')
-rw-r--r-- | localedata/tst-fmon.c | 6 |
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); |