]> git.ipfire.org Git - thirdparty/util-linux.git/commit
mountpoint: refactor exit path
authorDave Reisner <d@falconindy.com>
Mon, 10 Oct 2011 23:14:15 +0000 (19:14 -0400)
committerKarel Zak <kzak@redhat.com>
Tue, 11 Oct 2011 09:03:45 +0000 (11:03 +0200)
commitb16b56ec55507b6b83e0d35e3cefeb16367f3363
treeb73d0802c5a4b77057aca78aef11ec166047870b
parentdfd2c7146849120ed7576771135299047a929c09
mountpoint: refactor exit path

There's only one condition for which we declare success, but many for
failure. Initialize rc as failure and set to success on this single
condition. In all cases, jump to a label to exit instead of exiting
immediately. This will be used later on to ease cleanup of any heap
allocations.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/mountpoint.c