aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2009-01-29 13:29:04 +0000
committerRoy Marples <roy@marples.name>2009-01-29 13:29:04 +0000
commit415fe87d8c3a53314b662c9b0018b8205027f446 (patch)
treef561d60ef2b6339ba6ed7f83ee5ad0fecb352993 /src
parent4f163f9b9ae66bb4caeb192d463510c3b1434fa3 (diff)
Clean up some compiler warnings.
Diffstat (limited to 'src')
-rw-r--r--src/librc/librc-misc.c3
-rw-r--r--src/librc/librc.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/librc/librc-misc.c b/src/librc/librc-misc.c
index 749fd812..04c097b1 100644
--- a/src/librc/librc-misc.c
+++ b/src/librc/librc-misc.c
@@ -66,7 +66,8 @@ ssize_t rc_getline(char **line, size_t *len, FILE *fp)
}
p = *line + last;
memset(p, 0, BUFSIZ);
- fgets(p, BUFSIZ, fp);
+ if (fgets(p, BUFSIZ, fp) == NULL)
+ break;
last += strlen(p);
if (last && (*line)[last - 1] == '\n') {
(*line)[last - 1] = '\0';
diff --git a/src/librc/librc.c b/src/librc/librc.c
index b355d7f5..204e07f3 100644
--- a/src/librc/librc.c
+++ b/src/librc/librc.c
@@ -555,7 +555,8 @@ rc_service_mark(const char *service, const RC_SERVICE state)
RC_SVCDIR "/%s/%s",
rc_parse_service_state(RC_SERVICE_WASINACTIVE),
base);
- symlink(init, was);
+ if (symlink(init, was) == -1)
+ return false;
skip_wasinactive = true;
}
if (unlink(file) == -1) {