On 2/17/06, Peter N. Lundblad <peter@famlundblad.se> wrote:
> On Thu, 16 Feb 2006 jerenkrantz@tigris.org wrote:
>
> > @@ -69,7 +82,7 @@
> > * has a lifetime tied to POOL.
> > */
> > dav_props_t
> > -expand_ns(ns_t *ns_list, const char *name, apr_pool_t *pool)
> > +expand_ns(ns_t *ns_list, const char *name)
> > {
> > char *colon;
> > dav_props_t prop_name;
> > @@ -77,29 +90,30 @@
> > colon = strchr(name, ':');
>
> Hidden cast away of const. (See below)
>
> > if (colon)
> > {
> > - char *stripped_name;
> > ns_t *ns;
> >
> > - stripped_name = apr_pstrmemdup(pool, name, colon-name);
> > + *colon = '\0';
>
> Which we now modify. While you could probably argue that name must be
> modifiable anyway, I still think this is ugly and error-prone. Couldn't
> you use strncmp instead?
Sure, that'd be better. ;-) -- justin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Feb 17 09:08:37 2006