All of lore.kernel.org
 help / color / mirror / Atom feed
From: Karel Zak <kzak@redhat.com>
To: "Voelker, Bernhard" <bernhard.voelker@siemens-enterprise.com>
Cc: Dave Reisner <d@falconindy.com>,
	"util-linux@vger.kernel.org" <util-linux@vger.kernel.org>,
	Dave Reisner <dreisner@archlinux.org>
Subject: Re: [PATCH 1/2] mountpoint: refactor exit path
Date: Tue, 11 Oct 2011 10:14:25 +0200	[thread overview]
Message-ID: <20111011081425.GA20392@nb.net.home> (raw)
In-Reply-To: <7856072A9D04C24B82DFE2B1112FE38A0D83B8E98F@MCHP058A.global-ad.net>

On Tue, Oct 11, 2011 at 09:55:43AM +0200, Voelker, Bernhard wrote:
> Karel Zak wrote:
> 
> > On Tue, Oct 11, 2011 at 09:07:15AM +0200, Voelker, Bernhard wrote:
> > > > +finish:
> > > > +	return rc;
> > > 
> > > IMHO 'goto' is ugly and should only be used in more difficult
> > > cases. In this case - if you really liked to avoid several
> > > free(spec) statements - it could be easily done with a few
> > > else statements.
> 
> 
> > BTW, now you know why I don't like free-before-exit in simple utils
> > like mountpoint(1). It makes code less readable and needlessly
> > complicated.
> 
> no worries. I'm okay with it if you are. ;-)
> 
> Re free-before-exit: the problem is in tools like valgrind.

 Yes if we want to use mountpoint(1) as a test (referential)
 application for libmount, otherwise it's better to keep so small
 utils simple and stupid. 

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

  reply	other threads:[~2011-10-11  8:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-10 23:14 [PATCH 1/2] mountpoint: refactor exit path Dave Reisner
2011-10-10 23:14 ` [PATCH 2/2] mountpoint: support symbolic and relative paths Dave Reisner
2011-10-11  9:34   ` Karel Zak
2011-10-11  7:07 ` [PATCH 1/2] mountpoint: refactor exit path Voelker, Bernhard
2011-10-11  7:44   ` Karel Zak
2011-10-11  7:55     ` Voelker, Bernhard
2011-10-11  8:14       ` Karel Zak [this message]
2011-10-11  9:06 ` Karel Zak
2011-10-11  9:31   ` Karel Zak
  -- strict thread matches above, loose matches on Subject: below --
2011-10-09 15:12 Dave Reisner
2011-10-10 19:45 ` Dave Reisner
2011-10-10 23:05   ` Karel Zak

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=20111011081425.GA20392@nb.net.home \
    --to=kzak@redhat.com \
    --cc=bernhard.voelker@siemens-enterprise.com \
    --cc=d@falconindy.com \
    --cc=dreisner@archlinux.org \
    --cc=util-linux@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.