Re: Missing code in options.c ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe fio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux