From: GNicz <gnicz@o2.pl>
To: linux-kernel@vger.kernel.org
Subject: Re: question on common error-handling idiom
Date: Wed, 03 Nov 2004 09:11:52 +0100 [thread overview]
Message-ID: <418892C8.8000806@o2.pl> (raw)
In-Reply-To: <4187E920.1070302@nortelnetworks.com>
Some code parts is using diffirent error handling.
if(err1) {
clenup1;
return -ERR1;
}
...
if(err2) {
cleanup2;
return -ERR2;
}
Shouldn't it be converted into:
err = -ERR1;
if(err1)
goto cleanup1;
...
err = -ERR2;
if(err2)
goto cleanup2;
I think there should be one methond, which will be used in all kernel code.
Regards, GNicz
next prev parent reply other threads:[~2004-11-03 8:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-02 20:08 question on common error-handling idiom Chris Friesen
2004-11-02 20:58 ` Jan Engelhardt
2004-11-02 21:12 ` linux-os
2004-11-03 10:45 ` Ross Kendall Axe
2004-11-02 21:12 ` Russell Miller
2004-11-02 21:16 ` Jesper Juhl
2004-11-02 21:21 ` Oliver Neukum
2004-11-02 21:29 ` Jan Engelhardt
2004-11-02 21:48 ` Jesper Juhl
2004-11-03 16:49 ` Chris Friesen
2004-11-03 8:11 ` GNicz [this message]
2004-11-04 19:52 ` Linus Torvalds
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=418892C8.8000806@o2.pl \
--to=gnicz@o2.pl \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.