From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steven Whitehouse Date: Tue, 14 Aug 2007 11:31:13 +0100 Subject: [Cluster-devel] Re: [PATCH] gfs2: better code for translating characters In-Reply-To: <46C08843.8010302@zytor.com> References: <11869741183677-git-send-email-crquan@gmail.com> <91b13c310708122008w27b86359n5b135df3e229e616@mail.gmail.com> <46BFDDBB.2020104@zytor.com> <91b13c310708122206v5e4023f2w7464611a96ae67d9@mail.gmail.com> <46BFF179.8060308@zytor.com> <91b13c310708130219j170190f6r100c47171f92077@mail.gmail.com> <46C08843.8010302@zytor.com> Message-ID: <1187087473.8765.846.camel@quoit> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, On Mon, 2007-08-13 at 09:35 -0700, H. Peter Anvin wrote: > rae l wrote: > > On 8/13/07, H. Peter Anvin 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.