Re: [PATCH 1/3] lib/string_helpers: Consolidate yesno() implementation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 19 Jan 2022 11:15:08 +0200
Andy Shevchenko <andy.shevchenko@xxxxxxxxx> wrote:

> > +static inline const char *yesno(bool v) { return v ? "yes" : "no"; }  
> 
> 
> 
> Perhaps keep it on 4 lines? Yes, yes/no is short, but if we add others
> (enable/disable) it will not be possible to keep on one line. And hence
> style will be broken among similar functions.

Agreed. Functions should always be of the normal format:

type func(params)
{
	body;
}

Unless it is a stub function.

type func(params) { return 0; }

-- Steve



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux