From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: xen-devel@lists.xenproject.org,
Ian Jackson <Ian.Jackson@eu.citrix.com>,
ian.campbell@citrix.com
Subject: Re: [PATCH v3 5/5] mkelf32: Close those file descriptors in the error paths.
Date: Thu, 18 Feb 2016 16:12:34 -0500 [thread overview]
Message-ID: <20160218211234.GB28661@localhost.localdomain> (raw)
In-Reply-To: <56C6033A02000078000D3CAC@prv-mh.provo.novell.com>
On Thu, Feb 18, 2016 at 09:45:30AM -0700, Jan Beulich wrote:
> >>> On 18.02.16 at 17:39, <Ian.Jackson@eu.citrix.com> wrote:
> > Jan Beulich writes ("Re: [PATCH v3 5/5] mkelf32: Close those file descriptors
> > in the error paths."):
> >> On 12.02.16 at 04:08, <konrad.wilk@oracle.com> wrote:
> >> > While we are operating here we may as well fix some of the
> >> > file descriptor leaks.
> >>
> >> I'm not convinced. The added goto-s make the code uglier to read,
> >> and this being a standalone utility there's not really any leak here.
> >
> > I don't buy this `uglier to read'. What `return 1' does is make me
> > think `is some resource being leaked' and `do I need to audit this
> > thing'.
>
> Certainly a matter of taste to some degree - goto-s are always
> ugly to read to my eyes. Irrespective of this I don't buy the leak
> aspect for a non-library like, short running build utility. The close()
> calls are just more code, with absolutely no added benefit to the
> system the code runs on.
<chuckles>
If I turned them in:
if (..blah..)
{
close(infd);
return -1;
}
would that satisfy you?
(Irrespective of the 'no added benefit to the system the code runs
on.').
>
> Jan
>
next prev parent reply other threads:[~2016-02-18 21:12 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-12 3:08 [PATCH v3] Requisite paches for xSplice v3 (not yet posted) Konrad Rzeszutek Wilk
2016-02-12 3:08 ` [PATCH v3 1/5] hypervisor/arm/keyhandler: Declare struct cpu_user_regs; Konrad Rzeszutek Wilk
2016-02-12 8:51 ` Jan Beulich
2016-02-12 14:06 ` Konrad Rzeszutek Wilk
2016-02-12 14:54 ` Jan Beulich
2016-02-12 11:37 ` Stefano Stabellini
2016-02-12 12:20 ` Jan Beulich
2016-02-12 12:46 ` Stefano Stabellini
2016-02-12 14:53 ` Jan Beulich
2016-02-12 3:08 ` [PATCH v3 2/5] arm/config: Declare ELFSIZE_[32|64] respectively Konrad Rzeszutek Wilk
2016-02-12 11:26 ` Stefano Stabellini
2016-02-12 14:17 ` Konrad Rzeszutek Wilk
2016-02-12 15:04 ` Jan Beulich
2016-02-12 15:26 ` Stefano Stabellini
2016-02-12 15:56 ` Konrad Rzeszutek Wilk
2016-02-12 15:57 ` Stefano Stabellini
2016-02-12 17:50 ` Konrad Rzeszutek Wilk
2016-03-16 17:32 ` Julien Grall
2016-03-16 17:52 ` Konrad Rzeszutek Wilk
2016-03-16 18:08 ` Julien Grall
2016-03-16 19:21 ` Konrad Rzeszutek Wilk
2016-03-17 1:16 ` Konrad Rzeszutek Wilk
2016-03-17 11:04 ` Julien Grall
2016-03-17 18:52 ` Konrad Rzeszutek Wilk
2016-02-12 3:08 ` [PATCH v3 3/5] build: remove .config from /boot when uninstalling Konrad Rzeszutek Wilk
2016-02-12 14:11 ` Doug Goldstein
2016-02-12 3:08 ` [PATCH v3 4/5] mkelf32: Remove the 32-bit hypervisor support Konrad Rzeszutek Wilk
2016-02-12 3:08 ` [PATCH v3 5/5] mkelf32: Close those file descriptors in the error paths Konrad Rzeszutek Wilk
2016-02-18 16:29 ` Jan Beulich
2016-02-18 16:39 ` Ian Jackson
2016-02-18 16:45 ` Jan Beulich
2016-02-18 21:12 ` Konrad Rzeszutek Wilk [this message]
2016-02-19 11:39 ` Jan Beulich
2016-02-19 11:42 ` Ian Jackson
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=20160218211234.GB28661@localhost.localdomain \
--to=konrad.wilk@oracle.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=JBeulich@suse.com \
--cc=ian.campbell@citrix.com \
--cc=xen-devel@lists.xenproject.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).