Mailinglist Archive: yast-devel (78 mails)

< Previous Next >
[yast-devel] Re: [yast-commit] r66428 - in /branches/SuSE-Code-11-SP2-Branch/s390: package/yast2-s390.changes src/modules/DASDController.ycp
Dne 13.10.2011 15:35, aschnell@xxxxxxxxxxxxxxxxx napsal(a):

+ /*
+ l = maplist(map<string, any> m, l, {
+ return filter(string k, any v, m, {
+ return contains([ "channel", "dev_name" ], k);
+ });
});
+ */

Avoid commenting dead code, just remove it (it's still in SVN history if you
need
to recover it later, just use a descriptive commit message so you can later
find it
easily)

(IMO commenting is acceptable if you need to temporarily disable some code.
But don't forget to add some FIXME comment why it was disabled in that case.)


+ return $[ "devices" : l ];

Oh! At first sight I was wondering why number one was returned here, then I
noticed
that there is "l" (letter L) not "1" (one). In fixed font in my email client
they
look very similar...

Use more descriptive variables if possible, especially when a typo can be
overlooked
like in this case...


--

Ladislav Slez√°k
Appliance department / YaST Developer
Lihovarsk√° 1060/12
190 00 Prague 9 / Czech Republic
tel: +420 284 028 960
lslezak@xxxxxxxx
SUSE
--
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: yast-devel+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups