diff options
author | Michael Adam <obnox@samba.org> | 2009-08-07 08:56:46 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2009-08-07 08:56:46 +0200 |
commit | 02e7bc7545d8d1b1d4f61882ec5359acb05b9176 (patch) | |
tree | 0d3c12f55bef5b8c0de8dcc1c1ea66dd596c4eaf | |
parent | 3adec818726bc33a1c5eaf2739b2bf4e000c06cc (diff) | |
download | tinyproxy-02e7bc7545d8d1b1d4f61882ec5359acb05b9176.tar.gz tinyproxy-02e7bc7545d8d1b1d4f61882ec5359acb05b9176.zip |
send_html_file(): remove a discards qualifyer warning
and untangle assignment from check.
Michael
Diffstat (limited to '')
-rw-r--r-- | src/html-error.c | 5 |
1 files 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) |