httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@apache.org>
Subject Re: Function abuse/cpu wasteage?
Date Sun, 08 Jan 2012 01:18:18 GMT
apr_strncpy()??

In any case, there is a better way to do the check, and
so I'll implement that.
On Jan 5, 2012, at 4:24 PM, William A. Rowe Jr. wrote:

> modules\proxy\mod_proxy_balancer.c:                    PROXY_STRNCPY(bsel->s->lb
> pname, val);
> modules\proxy\mod_proxy_balancer.c:                    PROXY_STRNCPY(bsel->s->st
> icky_path, val);
> modules\proxy\mod_proxy_balancer.c:                    PROXY_STRNCPY(bsel->s->st
> icky, val);
> modules\proxy\mod_proxy_balancer.c:                        PROXY_STRNCPY(bsel->s
> ->sticky_path, path);
> 
> modules\proxy\mod_proxy.c:        PROXY_STRNCPY(worker->s->route, val);
> modules\proxy\mod_proxy.c:        PROXY_STRNCPY(worker->s->redirect, val);
> modules\proxy\mod_proxy.c:        PROXY_STRNCPY(worker->s->flusher, val);
> modules\proxy\mod_proxy.c:        PROXY_STRNCPY(balancer->s->sticky_path, val);
> modules\proxy\mod_proxy.c:        PROXY_STRNCPY(balancer->s->sticky, val);
> modules\proxy\mod_proxy.c:            PROXY_STRNCPY(balancer->s->sticky_path, pa
> th);
> modules\proxy\mod_proxy.c:            PROXY_STRNCPY(conf->forward->s->name,
> "proxy:forward");
> modules\proxy\mod_proxy.c:            PROXY_STRNCPY(conf->forward->s->hostname,
> "*");
> modules\proxy\mod_proxy.c:            PROXY_STRNCPY(conf->forward->s->scheme,
> "*");
> modules\proxy\mod_proxy.c:            PROXY_STRNCPY(reverse->s->name,     "proxy
> :reverse");
> modules\proxy\mod_proxy.c:            PROXY_STRNCPY(reverse->s->hostname, "*");
> modules\proxy\mod_proxy.c:            PROXY_STRNCPY(reverse->s->scheme,   "*");
> 
> Where are the rv tests?  If no rv tests were needed, then why waste all the extra
> strlen cycles, and not simply apr_cpystrn or apr_strncpy these instead?
> 


Mime
View raw message