[Swan] initial thoughts on uncrustifying libreswan

Paul Wouters pwouters at redhat.com
Fri May 24 18:39:30 EEST 2013


On Fri, 24 May 2013, Lennart Sorensen wrote:

>>> Now if you happen to need to do:
>>>
>>> 	code;
>>> 	more code;
>>> 	{
>>> 		int i;
>>>
>>> 		for (i=0; i<5; i++) {
>>> 			code;
>>> 		}
>>> 	}
>>>
>>> well then I just question what you are doing.
>>
>> What's wrong with trying to keep variable scope as local as possible?
>
> Nothing, but C doesn't require a block to do that anymore.

func()
{
     code;
     more code;
     int foo;
     even more code using foo;
     even even more code not using foo;
}

What is the scope of foo end?

now compare:

func()
{
     code;
     more code;
     {
        int foo;
        even more code using foo;
     }
     even even more code not using foo;
}

Paul


More information about the Swan mailing list