From: wessels <> Date: Fri, 17 Jul 1998 04:41:33 +0000 (+0000) Subject: const goop X-Git-Tag: SQUID_3_0_PRE1~3068 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4aba13edd48b724d131609955702e8302dd3b67f;p=thirdparty%2Fsquid.git const goop --- diff --git a/src/protos.h b/src/protos.h index e6141aea21..6e0208a0bf 100644 --- a/src/protos.h +++ b/src/protos.h @@ -914,7 +914,7 @@ extern protocol_t urlParseProtocol(const char *); extern method_t urlParseMethod(const char *); extern void urlInitialize(void); extern request_t *urlParse(method_t, char *); -extern char *urlCanonical(const request_t *); +extern const char *urlCanonical(request_t *); extern char *urlRInternal(const char *host, u_short port, const char *dir, const char *name); extern char *urlInternal(const char *dir, const char *name); extern int matchDomainName(const char *d, const char *h); diff --git a/src/structs.h b/src/structs.h index 1a4de22cfe..f9e98b05f4 100644 --- a/src/structs.h +++ b/src/structs.h @@ -1126,7 +1126,7 @@ struct _request_t { char user_ident[USER_IDENT_SZ]; /* from proxy auth or ident server */ u_short port; String urlpath; - char *canonical; + const char *canonical; int link_count; /* free when zero */ int flags; HttpHdrCc *cache_control; diff --git a/src/url.cc b/src/url.cc index 48c9e37ff3..8afafdeca7 100644 --- a/src/url.cc +++ b/src/url.cc @@ -1,6 +1,6 @@ /* - * $Id: url.cc,v 1.99 1998/07/16 22:22:55 wessels Exp $ + * $Id: url.cc,v 1.100 1998/07/16 22:41:35 wessels Exp $ * * DEBUG: section 23 URL Parsing * AUTHOR: Duane Wessels @@ -261,8 +261,8 @@ urnParse(method_t method, char *urn) return requestCreate(method, PROTO_URN, urn + 4); } -char * -urlCanonical(const request_t * request) +const char * +urlCanonical(request_t * request) { LOCAL_ARRAY(char, portbuf, 32); LOCAL_ARRAY(char, urlbuf, MAX_URL); @@ -289,7 +289,7 @@ urlCanonical(const request_t * request) break; } } - return request->canonical = xstrdup(urlbuf); + return (request->canonical = xstrdup(urlbuf)); } char *