From: Jens Axboe <axboe@kernel.dk>
To: Erwan Velu <erwan@enovance.com>, fio@vger.kernel.org
Subject: Re: Missing code in options.c ?
Date: Wed, 02 Apr 2014 08:27:59 -0600 [thread overview]
Message-ID: <533C1E6F.1040401@kernel.dk> (raw)
In-Reply-To: <533BD35E.2020703@enovance.com>
On 2014-04-02 03:07, Erwan Velu wrote:
> Hi Jens,
>
> Sorry for spawning many emails but I think it's easier to follow having
> an email per problem instead of long emails with mixed stuff in it.
No worries, we like hearing about bugs we can get fixed :-)
> In options.c, we can see that :
> http://git.kernel.dk/?p=fio.git;a=blob;f=options.c;h=4a54c98c15045864931ea503d3f7920bab4ae431;hb=HEAD#l212
>
>
> ret = bssplit_ddir(&td->o, DDIR_READ, str) is performed while ret can be
> already setup in the previous line. I'm not mastering this part but I
> wonder what is lacks :
>
> - a missing if (!ret) ?
> - some strdup + free around ? Does using str directly is safe here ?
>
> Wouldn't be easier to read to get some goto to the global free code at
> the end of the function instead of a multiple chained if (!ret) {} ?
I need to take a closer look at that part. It does look a bit messy.
--
Jens Axboe
prev parent reply other threads:[~2014-04-02 14:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-02 9:07 Missing code in options.c ? Erwan Velu
2014-04-02 14:27 ` Jens Axboe [this message]
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=533C1E6F.1040401@kernel.dk \
--to=axboe@kernel.dk \
--cc=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.