diff options
author | Martin Kraemer <martin@apache.org> | 2008-04-07 08:14:31 +0200 |
---|---|---|
committer | Martin Kraemer <martin@apache.org> | 2008-04-07 08:14:31 +0200 |
commit | 6bc08c93c9599a988d87cb6396bd36f0597d969a (patch) | |
tree | d8fe1991aec0b73823cdc27b56383229d7613ca2 /server/util_cookies.c | |
parent | Another typo (diff) | |
download | apache2-6bc08c93c9599a988d87cb6396bd36f0597d969a.tar.xz apache2-6bc08c93c9599a988d87cb6396bd36f0597d969a.zip |
Tweaking code to compile on pre-C99 compilers
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@645392 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server/util_cookies.c')
-rw-r--r-- | server/util_cookies.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/server/util_cookies.c b/server/util_cookies.c index dc04b5bbe6..f7f6b79b09 100644 --- a/server/util_cookies.c +++ b/server/util_cookies.c @@ -38,6 +38,7 @@ AP_DECLARE(apr_status_t) ap_cookie_write(request_rec * r, const char *name, cons { char *buffer; + char *rfc2109; /* handle expiry */ buffer = ""; @@ -46,10 +47,10 @@ AP_DECLARE(apr_status_t) ap_cookie_write(request_rec * r, const char *name, cons } /* create RFC2109 compliant cookie */ - char *rfc2109 = apr_pstrcat(r->pool, name, "=", val, ";", - buffer, - attrs && strlen(attrs) > 0 ? - attrs : DEFAULT_ATTRS, NULL); + rfc2109 = apr_pstrcat(r->pool, name, "=", val, ";", + buffer, + attrs && strlen(attrs) > 0 ? + attrs : DEFAULT_ATTRS, NULL); ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, LOG_PREFIX "user '%s' set cookie: '%s'", r->user, rfc2109); apr_table_addn(r->headers_out, SET_COOKIE, rfc2109); @@ -73,6 +74,7 @@ AP_DECLARE(apr_status_t) ap_cookie_write2(request_rec * r, const char *name2, co { char *buffer; + char *rfc2965; /* handle expiry */ buffer = ""; @@ -81,10 +83,10 @@ AP_DECLARE(apr_status_t) ap_cookie_write2(request_rec * r, const char *name2, co } /* create RFC2965 compliant cookie */ - char *rfc2965 = apr_pstrcat(r->pool, name2, "=", val, ";", - buffer, - attrs2 && strlen(attrs2) > 0 ? - attrs2 : DEFAULT_ATTRS, NULL); + rfc2965 = apr_pstrcat(r->pool, name2, "=", val, ";", + buffer, + attrs2 && strlen(attrs2) > 0 ? + attrs2 : DEFAULT_ATTRS, NULL); ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, LOG_PREFIX "user '%s' set cookie2: '%s'", r->user, rfc2965); apr_table_addn(r->headers_out, SET_COOKIE2, rfc2965); |