diff --git a/modules/proxy/mod_proxy_balancer.c b/modules/proxy/mod_proxy_balancer.c index a2af29d93a..444ce64e69 100644 --- a/modules/proxy/mod_proxy_balancer.c +++ b/modules/proxy/mod_proxy_balancer.c @@ -143,7 +143,7 @@ static char *get_path_param(apr_pool_t *pool, char *url, * Session path was found, get it's value */ ++path; - if (strlen(path)) { + if (*path) { char *q; path = apr_strtok(apr_pstrdup(pool, path), pathdelims, &q); return path; 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);