diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-06-11 13:13:21 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2016-06-11 13:13:21 +0000 |
commit | 500500ec9b7b0d0cef90b48c9b4ddc8866b5f19c (patch) | |
tree | 1d7b3e6fab5c199fdbbaab53ee9532de6a4c8cf7 /gettext-tools/gnulib-tests/test-getline.c | |
parent | 6eb5949dd99d174393465069c2fd0bab32deddcc (diff) | |
download | gettext-tarball-500500ec9b7b0d0cef90b48c9b4ddc8866b5f19c.tar.gz |
gettext-0.19.8.1HEADgettext-0.19.8.1master
Diffstat (limited to 'gettext-tools/gnulib-tests/test-getline.c')
-rw-r--r-- | gettext-tools/gnulib-tests/test-getline.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gettext-tools/gnulib-tests/test-getline.c b/gettext-tools/gnulib-tests/test-getline.c index 238742c..13dcb1d 100644 --- a/gettext-tools/gnulib-tests/test-getline.c +++ b/gettext-tools/gnulib-tests/test-getline.c @@ -1,5 +1,5 @@ /* Test of getline() function. - Copyright (C) 2007-2015 Free Software Foundation, Inc. + Copyright (C) 2007-2016 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -71,8 +71,8 @@ main (void) free (line); /* Test growth of buffer, must not leak. */ - line = malloc (1); - len = 0; + len = 1; + line = malloc (len); result = getline (&line, &len, f); ASSERT (result == 3); ASSERT (strcmp (line, "bc\n") == 0); |