Fix test for EOF on continuation line

getline() returns -1 on EOF, need to not loose that by forcing
result to size_t (unsigned).

Reported-by: Petr Sabata
This commit is contained in:
Stephen Hemminger 2011-07-11 10:38:10 -07:00
parent e760a19a43
commit 21a85d3bec
1 changed files with 1 additions and 1 deletions

View File

@ -700,7 +700,7 @@ ssize_t getcmdline(char **linep, size_t *lenp, FILE *in)
while ((cp = strstr(*linep, "\\\n")) != NULL) {
char *line1 = NULL;
size_t len1 = 0;
size_t cc1;
ssize_t cc1;
if ((cc1 = getline(&line1, &len1, in)) < 0) {
fprintf(stderr, "Missing continuation line\n");