From 02e7bc7545d8d1b1d4f61882ec5359acb05b9176 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Fri, 7 Aug 2009 08:56:46 +0200 Subject: send_html_file(): remove a discards qualifyer warning and untangle assignment from check. Michael --- src/html-error.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/html-error.c b/src/html-error.c index 045a334..fa6c02a 100644 --- a/src/html-error.c +++ b/src/html-error.c @@ -115,7 +115,7 @@ int send_html_file (FILE * infile, struct conn_s *connptr) { char inbuf[HTML_BUFSIZE], *varstart = NULL, *p; - char *varval; + const char *varval; int in_variable = 0, writeret; while (fgets (inbuf, HTML_BUFSIZE, infile) != NULL) @@ -128,7 +128,8 @@ send_html_file (FILE * infile, struct conn_s *connptr) if (in_variable) { *p = '\0'; - if (!(varval = lookup_variable (connptr, varstart))) + varval = (const char *)lookup_variable (connptr, varstart); + if (!varval) varval = "(unknown)"; writeret = write_message (connptr->client_fd, "%s", varval); if (writeret) -- cgit v1.2.3