Re: [PATCH] staging/adt7316 Fix some 'interesting' string operations

2013-04-09 Thread Jonathan Cameron
On 04/08/2013 06:54 PM, Luck, Tony wrote: >> I think it is a good idea to switch directly to strtobool. But anyway, if you >> don't want to respin the patch it is fine as it is. > I didn't know that strtobool() existed ... but now that I do I agree that it > would > be better to use it here. But

RE: [PATCH] staging/adt7316 Fix some 'interesting' string operations

2013-04-08 Thread Luck, Tony
> I think it is a good idea to switch directly to strtobool. But anyway, if you > don't want to respin the patch it is fine as it is. I didn't know that strtobool() existed ... but now that I do I agree that it would be better to use it here. But ... I'm less comfortable updating the patch to u

Re: [PATCH] staging/adt7316 Fix some 'interesting' string operations

2013-04-06 Thread Lars-Peter Clausen
On 04/04/2013 11:37 PM, Luck, Tony wrote: > Calling memcmp() to check the value of the first byte in a string is overkill. > Just use buf[0] == '1' or buf[0] != '1' as appropriate. > > Signed-off-by: Tony Luck > I think it is a good idea to switch directly to strtobool. But anyway, if you don't

Re: [PATCH] staging/adt7316 Fix some 'interesting' string operations

2013-04-05 Thread Greg Kroah-Hartman
On Thu, Apr 04, 2013 at 02:37:24PM -0700, Luck, Tony wrote: > Calling memcmp() to check the value of the first byte in a string is overkill. > Just use buf[0] == '1' or buf[0] != '1' as appropriate. > > Signed-off-by: Tony Luck I'll let Jonathan take this through his tree which eventually makes