Re: [Libclc-developers] Some more comments to the current CVS tree
Status: Planning
Brought to you by:
augestad
|
From: regis <re...@in...> - 2003-04-02 16:54:27
|
Jan Engelhardt wrote:
> src/clc_strcasecmp.c:
> for (;; s1++, s2++)
>
> Euh, maybe written as while(1) { ...; ++s1; ++s2 } ?
while (1) is idiomatically a nonsense.
while(condition) is for conditionnal continuation of loops.
if there is no condition, there while should not be used.
The idiomatic construct for non-conditional loop is for(;;)
with empty continuation condition.
> src/clc_strlcpy.c:
> You cannot get rid of me.
> - while(*src)
> - ++src
> + while(*src++);
No gain except obfuscation of code.
Ironically, you propose to do here
the reverse of your proposal for src/clc_strcasecmp.c:
above...
|