summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2009-08-07 08:56:46 +0200
committerMichael Adam <obnox@samba.org>2009-08-07 08:56:46 +0200
commit02e7bc7545d8d1b1d4f61882ec5359acb05b9176 (patch)
tree0d3c12f55bef5b8c0de8dcc1c1ea66dd596c4eaf /src
parent3adec818726bc33a1c5eaf2739b2bf4e000c06cc (diff)
downloadtinyproxy-02e7bc7545d8d1b1d4f61882ec5359acb05b9176.tar.gz
tinyproxy-02e7bc7545d8d1b1d4f61882ec5359acb05b9176.zip
send_html_file(): remove a discards qualifyer warning
and untangle assignment from check. Michael
Diffstat (limited to 'src')
-rw-r--r--src/html-error.c5
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)