From: Erwan Velu <erwan@enovance.com>
To: fio@vger.kernel.org
Subject: Curious code in init()
Date: Wed, 02 Apr 2014 10:33:43 +0200 [thread overview]
Message-ID: <533BCB67.4050709@enovance.com> (raw)
Hey Jens,
The following code is pretty confusing for me :
http://git.kernel.dk/?p=fio.git;a=blob;f=init.c;h=c3996a76c12840e3ab3cf6514e5d5dce611a1077;hb=HEAD#l1962
The "if (nr_clients && fio_clients_connect()) {" is using the do_exit
concept while being after the code that manage it and does a return -1
while exit code is set to 1.
I don't get how it should be fixed.
1- we shall move the if nr_clients before the "if (do_exit", remove the
return -1 and adjust the exit_code ?
2- we shall get rid of the do_exit & exit code semantic of the if
nr_clients.
What was the intent while reading the code ? ;o)
Erwan,
next reply other threads:[~2014-04-02 8:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-02 8:33 Erwan Velu [this message]
2014-04-02 14:24 ` Curious code in init() Jens Axboe
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=533BCB67.4050709@enovance.com \
--to=erwan@enovance.com \
--cc=fio@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.