summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorStefan Fritsch <sf@apache.org>2010-08-04 00:06:24 +0200
committerStefan Fritsch <sf@apache.org>2010-08-04 00:06:24 +0200
commit7b3189cb8dff0f9a030a9fd1c01486ce35c78caf (patch)
treef3d81f71834f0ff3fb0ad89fc0b43d91e9946f64 /server
parentremove some useless use of strlen() (diff)
downloadapache2-7b3189cb8dff0f9a030a9fd1c01486ce35c78caf.tar.xz
apache2-7b3189cb8dff0f9a030a9fd1c01486ce35c78caf.zip
remove more useless use of strlen
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@982046 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server')
-rw-r--r--server/util_cookies.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/server/util_cookies.c b/server/util_cookies.c
index 5e00fc6c5f..3b3c952382 100644
--- a/server/util_cookies.c
+++ b/server/util_cookies.c
@@ -50,10 +50,8 @@ AP_DECLARE(apr_status_t) ap_cookie_write(request_rec * r, const char *name, cons
}
/* create RFC2109 compliant cookie */
- 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 && *attrs ? attrs : DEFAULT_ATTRS, NULL);
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, LOG_PREFIX
"user '%s' set cookie: '%s'", r->user, rfc2109);
@@ -94,10 +92,8 @@ AP_DECLARE(apr_status_t) ap_cookie_write2(request_rec * r, const char *name2, co
}
/* create RFC2965 compliant cookie */
- 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 && *attrs2 ? attrs2 : DEFAULT_ATTRS, NULL);
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, LOG_PREFIX
"user '%s' set cookie2: '%s'", r->user, rfc2965);