From: "Riley Williams" <Riley@Williams.Name>
To: "Ingo Oeser" <ingo.oeser@informatik.tu-chemnitz.de>,
"Rusty Russell" <rusty@rustcorp.com.au>
Cc: <linux-kernel@vger.kernel.org>
Subject: RE: try_then_request_module
Date: Mon, 19 May 2003 19:50:02 +0100 [thread overview]
Message-ID: <BKEGKPICNAKILKJKMHCAOEPLDAAA.Riley@Williams.Name> (raw)
In-Reply-To: <20030519110832.G626@nightmaster.csn.tu-chemnitz.de>
Hi Ingo.
> Usually this is all as simple as:
>
> int module_loaded_flag=0;
>
> retry_with_module_loaded:
>
> /* search code */
>
> if (!module_loaded_flag && !found) {
> module_loaded_flag=1;
> if (!request_module(bla))
> goto retry_with_module_loaded;
> }
> return found;
>
> which is very space efficient and also still readable.
Out of curiosity, what exactly is the purpose of the goto in the
above code? Since we set module_loaded_flag just prior to it, the
first if statement must fail after the goto, so we just fall down
to where we would have been without the goto.
It all looks a tad pointless to me...
Best wishes from Riley.
---
* Nothing as pretty as a smile, nothing as ugly as a frown.
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.481 / Virus Database: 277 - Release Date: 13-May-2003
next prev parent reply other threads:[~2003-05-19 18:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-19 1:41 try_then_request_module Rusty Russell
2003-05-19 9:08 ` try_then_request_module Ingo Oeser
2003-05-19 18:50 ` Riley Williams [this message]
2003-05-20 7:39 ` try_then_request_module Ingo Oeser
2003-05-21 23:18 ` try_then_request_module Riley Williams
2003-05-20 0:19 ` try_then_request_module Rusty Russell
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=BKEGKPICNAKILKJKMHCAOEPLDAAA.Riley@Williams.Name \
--to=riley@williams.name \
--cc=ingo.oeser@informatik.tu-chemnitz.de \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox