commit | 21a85d3becf45e02985c466764ae19433d907c40 | [log] [tgz] |
---|---|---|
author | Stephen Hemminger <shemminger@vyatta.com> | Mon Jul 11 10:38:10 2011 -0700 |
committer | Stephen Hemminger <shemminger@vyatta.com> | Mon Jul 11 10:38:10 2011 -0700 |
tree | fbffa528304b4ae351ab605051dad96504aee54a | |
parent | e760a19a437997820f16846636c0db23faa6d3ba [diff] [blame] |
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
diff --git a/lib/utils.c b/lib/utils.c index 1b42222..efaf377 100644 --- a/lib/utils.c +++ b/lib/utils.c
@@ -700,7 +700,7 @@ 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");