From 81378bda614d80c2dca2e6693cdc73b03fa95526 Mon Sep 17 00:00:00 2001 From: Roland Schulz Date: Wed, 30 Apr 2014 03:37:36 -0400 Subject: [PATCH] Fix usage of gmx_eof gmx_eof has different behavior from gmx_eof and feof should be used here. Change-Id: I877c15d0edde64fe06ae2eedbda980f117509449 --- src/gromacs/utility/cstringutil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gromacs/utility/cstringutil.c b/src/gromacs/utility/cstringutil.c index 71c22d3838..29266fd276 100644 --- a/src/gromacs/utility/cstringutil.c +++ b/src/gromacs/utility/cstringutil.c @@ -103,7 +103,7 @@ char *fgets2(char *line, int n, FILE *stream) * or because of n being too small. * Since both cases occur very infrequently, we can check for EOF. */ - if (!gmx_eof(stream)) + if (!feof(stream)) { gmx_fatal(FARGS, "An input file contains a line longer than %d characters, while the buffer passed to fgets2 has size %d. The line starts with: '%20.20s'", n, n, line); } -- 2.22.0