Commit 21a85d3b authored by Stephen Hemminger's avatar Stephen Hemminger

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
parent e760a19a
......@@ -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");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment