From: hno <> Date: Mon, 22 Apr 2002 04:14:08 +0000 (+0000) Subject: const cleanup X-Git-Tag: SQUID_3_0_PRE1~1037 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=733fba1cbc2b1917f05db716654bfd35a8317afa;p=thirdparty%2Fsquid.git const cleanup --- diff --git a/src/gopher.cc b/src/gopher.cc index 9f14ab1f66..55505bb64f 100644 --- a/src/gopher.cc +++ b/src/gopher.cc @@ -1,6 +1,6 @@ /* - * $Id: gopher.cc,v 1.163 2002/04/21 21:23:15 hno Exp $ + * $Id: gopher.cc,v 1.164 2002/04/21 22:14:08 hno Exp $ * * DEBUG: section 10 Gopher * AUTHOR: Harvest Derived @@ -743,16 +743,16 @@ gopherSendRequest(int fd, void *data) { GopherStateData *gopherState = data; char *buf = memAllocate(MEM_4K_BUF); - char *t; if (gopherState->type_id == GOPHER_CSO) { - t = strchr(gopherState->request, '?'); - if (t) - t++; + const char *t = strchr(gopherState->request, '?'); + if (t != NULL) + t++; /* skip the ? */ else t = ""; snprintf(buf, 4096, "query %s\r\nquit\r\n", t); } else if (gopherState->type_id == GOPHER_INDEX) { - if ((t = strchr(gopherState->request, '?'))) + char *t = strchr(gopherState->request, '?'); + if (t != NULL) *t = '\t'; snprintf(buf, 4096, "%s\r\n", gopherState->request); } else {