Clean up some compiler warnings.

This commit is contained in:
Roy Marples 2009-01-29 13:29:04 +00:00
parent 4f163f9b9a
commit 415fe87d8c
2 changed files with 4 additions and 2 deletions

View File

@ -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';

View File

@ -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) {