[U-Boot] preferred style?
Wolfgang Denk
wd at denx.de
Tue Mar 23 07:36:49 CET 2010
Dear Heiko Schocher,
In message <4BA85E53.90404 at denx.de> you wrote:
>
> > I see function prototypes like:
> > static int
> > mod_i2c_mem(cmd_tbl_t *cmdtp, int incrflag, int flag, int argc, char *argv[])
> >
> > and also
> > int do_i2c_probe (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
> >
> > A few questions on this:
> >
> > is the preferred place of the type on a separate line (like for
> > mod_i2c_mem) or on the same line as the function (as for
> > do_i2c_probe)?
>
> Hmm.. I prefer to have this in one line, and think, this is the
> way to go ...
If possible, yes. But in the example above you cannot get it in one
line due to the line length restrictions. And instead of splitting the
arguments on two lines, I tend to believe that the example above is
"looking better". YMMV.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
If something is different, it's either better or worse, and usually
both. - Larry Wall
More information about the U-Boot
mailing list