Re: A CodingStyle suggestion

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Ahmed S. Darwish <darwish.07@...>
Cc: <linux-kernel@...>
Date: Sunday, February 4, 2007 - 8:36 am

On 2/4/07, Ahmed S. Darwish <darwish.07@gmail.com> wrote:


if we have some 100 lines of

ret = do_method()
if (ret) {
/* error handling */
}

This is going to additionally increase the number of lines of unnecessarily.

IMHO, when you have a large number of lines which do a similar thing ..

if ((ret = do_method()) < value)
   goto err;

could greatly reduce the number of lines, otherwise.

manu
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
A CodingStyle suggestion, Ahmed S. Darwish, (Sat Feb 3, 5:58 pm)
Re: A CodingStyle suggestion, Manu Abraham, (Sun Feb 4, 8:36 am)
Re: A CodingStyle suggestion, Ahmed S. Darwish, (Sun Feb 4, 8:10 am)
Re: A CodingStyle suggestion, Richard Knutsson, (Sat Feb 3, 6:56 pm)
Re: A CodingStyle suggestion, Ahmed S. Darwish, (Sat Feb 3, 8:05 pm)
Re: A CodingStyle suggestion, Richard Knutsson, (Sat Feb 3, 8:39 pm)
Re: A CodingStyle suggestion, Tim Schmielau, (Sat Feb 3, 8:22 pm)
Re: A CodingStyle suggestion, Roland Dreier, (Sat Feb 3, 8:21 pm)
Re: A CodingStyle suggestion, Randy Dunlap, (Sat Feb 3, 8:40 pm)
Re: A CodingStyle suggestion, Willy Tarreau, (Sun Feb 4, 2:35 am)
Re: A CodingStyle suggestion, Randy Dunlap, (Sat Feb 3, 5:59 pm)
Re: A CodingStyle suggestion, Theodore Tso, (Sun Feb 4, 8:48 am)
Re: A CodingStyle suggestion, Robert P. J. Day, (Sun Feb 4, 8:57 am)
Re: A CodingStyle suggestion, Manu Abraham, (Sun Feb 4, 8:55 am)