summaryrefslogtreecommitdiffstats
path: root/common.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2009-01-29 13:01:29 +0000
committerRoy Marples <roy@marples.name>2009-01-29 13:01:29 +0000
commitf22fb9b1c1232dd0385a00d7eb8ad0dbc172dc07 (patch)
treef886e73a43b66ad78b3e4be0d6e15d322a586427 /common.c
parented913a59775402a9ce66067858d7280fe4506176 (diff)
downloaddhcpcd-f22fb9b1c1232dd0385a00d7eb8ad0dbc172dc07.tar.xz
Clean up compiler warnings from overly pedantic checking.
Diffstat (limited to 'common.c')
-rw-r--r--common.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/common.c b/common.c
index 71f4e805..48f51a4e 100644
--- a/common.c
+++ b/common.c
@@ -94,7 +94,8 @@ again:
}
p = lbuf + last;
memset(p, 0, BUFSIZ);
- fgets(p, BUFSIZ, fp);
+ if (fgets(p, BUFSIZ, fp) == NULL)
+ break;
last += strlen(p);
if (last != 0 && lbuf[last - 1] == '\n') {
lbuf[last - 1] = '\0';