[SSSD] Code style -- for loop iterative variables initial declaration

Petr Cech pcech at redhat.com
Fri Aug 28 07:03:23 UTC 2015


Hi everyone,

I would like to ask you what you think about the initialization of 
iterative variables in forloops. I know that present code style does not 
allow it. But how I recognized, we use C99, and this feature is here now.

(example)
Instead of:|
|||# inti;
# for(i =0;...)|||
we could write:
||# for(inti =0;...)|

I see an advantage in limiting the validity of such variables. That 
means higher code readability. Disadvantages I searched but did not find.

Regards

Petr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20150828/3059080f/attachment.html>


More information about the sssd-devel mailing list