Subject: Re: c-style question
To: Simon Burge <>
From: Matt Thomas <>
List: tech-kern
Date: 11/18/2001 20:57:37
At 03:13 PM 11/19/2001 +1100, Simon Burge wrote:
>In KNF, do we prefer either
>         (*platform.cons_init)();
>         platform.cons_init();
>when cons_init is a function pointer?

I prefer the former since it makes it explicit that you are calling
a function pointer.

>Related is why in the above example we get an error in the later case
>but not the former.  "cons_init" is a macro in <dev/cons.h>, but for
>some reason it doesn't get expanded in the first case.  Any clue sticks
>available for something simple I might have overlooked?

I bet cons_init is defined as cons_init() which won't be expanded
on just a plain cons_init reference (the first case).