From 21a85d3becf45e02985c466764ae19433d907c40 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Mon, 11 Jul 2011 10:38:10 -0700 Subject: [PATCH] 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 --- lib/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils.c b/lib/utils.c index 1b4222245..efaf377ef 100644 --- a/lib/utils.c +++ b/lib/utils.c @@ -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"); -- 2.47.2