[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] Re: [PATCH] gfs2: better code for translating characters



Hi,

On Mon, 2007-08-13 at 09:35 -0700, H. Peter Anvin wrote:
> rae l wrote:
> > On 8/13/07, H. Peter Anvin <hpa zytor com> wrote:
> >> You seem to have confused modern compiled C with an old BASIC interpreter.
> >>
> >> Consider the code in point:
> >>
> >> -       while ((table = strchr(sdp->sd_table_name, '/')))
> >> +       table = sdp->sd_table_name;
> >> +       while ((table = strchr(table, '/')))
> >>                 *table = '_';
> > Sorry, I just mean for call to strchr, things are different,
> > especially for multiple '/' chars appeared.
> 
> Things are different only for multiple '/' chars.  In that case, the
> latter form is better, in the former case, there is no difference.
> 
> So it doesn't matter.  One is unambiguously better.
> 
> 	-hpa

I agree, so I've applied the patch. Thanks Denis,

Steve.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]