From 6bc08c93c9599a988d87cb6396bd36f0597d969a Mon Sep 17 00:00:00 2001 From: Martin Kraemer Date: Mon, 7 Apr 2008 06:14:31 +0000 Subject: [PATCH] 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 --- server/util_cookies.c | 18 ++++++++++-------- 1 file 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); -- 2.40.0