mirror of
https://github.com/apache/httpd.git
synced 2026-01-06 09:01:14 +03:00
remove more useless use of strlen
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@982046 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user