summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dbox.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/dbox.c b/dbox.c
index 53a905c..aadacb7 100644
--- a/dbox.c
+++ b/dbox.c
@@ -221,9 +221,7 @@ static const char *GetLine(FILE *p_fp)
static char s[1024];
size_t l;
- fgets(s, sizeof s, p_fp);
-
- if (feof(p_fp))
+ if (!fgets(s, sizeof s, p_fp))
{
return NULL;
}