[Buildroot] [PATCH] fs/ubifs: factorize all the "depends on" into "if...endif" blocks

Yann E. MORIN yann.morin.1998 at free.fr
Thu Apr 25 08:06:51 UTC 2013


Mark, All,

On Thursday 25 April 2013 09:49:52 Mark Jackson wrote:
> On 24/04/13 22:26, Yann E. MORIN wrote:
> > Comment the endif-s so we know at a glance to which if they belong to:
> > 
> > +endif # BR2_TARGET_ROOTFS_UBI
> > +
> > +endif # BR2_TARGET_ROOTFS_UBIFS
> 
> I *very* nearly put those in anyway, but checked with a few other Config.in files
> and none of them had such closing comments.

Yes, probably. Old code did not always follow this, especially when the
enclosed code blocks are small, or were small but later grew (which is very
often the case), and people going like "Oh I don't need to put a comment on
this closing conditional, it's just a few lines above. Oh, but now I added
three more lines. Oh, and now someone else added twenty more lines. And now
there is a new nested conditional block. Oh, and now the entire conditional
block no longer fits on a screen. Oh, now I'm lost...". ;-)

Which we should just avoid in the first place.

> > With that fixed:
> > Acked-by: "Yann E. MORIN" <yann.morin.1998 at free.fr>
> 
> I'll post a v2.

Thank you! :-)

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +0/33 662376056 | Software  Designer | \ / CAMPAIGN     |   ^                |
| --==< O_o >==-- '------------.-------:  X  AGAINST      |  /e\  There is no  |
| http://ymorin.is-a-geek.org/ | (*_*) | / \ HTML MAIL    |  """  conspiracy.  |
'------------------------------'-------'------------------'--------------------'


More information about the buildroot mailing list