[SSSD] [PATCH] Make parse_args skip extra spaces

Jakub Hrozek jhrozek at redhat.com
Fri May 27 12:28:08 UTC 2011


On 05/26/2011 06:56 PM, Stephen Gallagher wrote:
> On Thu, 2011-05-26 at 18:15 +0200, Jakub Hrozek wrote:
>> https://fedorahosted.org/sssd/ticket/871
>>
>> The second patch adds a couple of unit tests to exercise both the old
>> behaviour and the multiple spaces.
> 
> 
> Patch 0001: Nack.
> 
> "if (w) w = 0;" is redundant. "w = 0;" is sufficient here.
> 
> Also, while it's unlikely to matter, this code only handles the single
> whitespace code. It would be wiser if we used isspace() instead.
> 
> For readability purposes, please convert "i", "e" and "w" to the "bool"
> type and use true/false.
> 
> Finally, please comment this code. It's really difficult to read.
> 
> 
> Patch 0002: Please add test cases for tabs.
> 
> 

Done except converting "i" to "bool" - that can't be done, "i" is an
index, not a flag.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Make-parse_args-skip-extra-spaces.patch
Type: text/x-patch
Size: 2567 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20110527/f0090aea/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Unit-test-for-parge_args.patch
Type: text/x-patch
Size: 2789 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20110527/f0090aea/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: OpenPGP digital signature
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20110527/f0090aea/attachment.sig>


More information about the sssd-devel mailing list