Re: Question about style when converting from K&R to ANSI C.

From: Scott Robert Ladd (
Date: Sun Jun 01 2003 - 08:53:25 EST

Larry McVoy wrote:
>>Proposed conversion:
>>int foo(void)
>> /* body here */
> which is why I've always preferred
> int
> foo(void)
> {
> /* body here */
> }
> Is there some reason that I'm missing that the kernel folks like it the other
> way?

Just my personal opinion:

The return value is part of the function signature; placing it on a
separate line implies a disconnect between the return value and the rest
of the declaration.

It's a matter of psychology; your mileage may vary.

Scott Robert Ladd
Coyote Gulch Productions (

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to More majordomo info at Please read the FAQ at

This archive was generated by hypermail 2b29 : Sat Jun 07 2003 - 22:00:14 EST