Code cleanup. Signed-off-by: Wanlong Gao <gaowanlong at cn.fujitsu.com> --- daemon/isoinfo.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/daemon/isoinfo.c b/daemon/isoinfo.c index c0ee1c9..fd777bd 100644 --- a/daemon/isoinfo.c +++ b/daemon/isoinfo.c @@ -255,8 +255,6 @@ isoinfo (const char *path) goto done; ret = parse_isoinfo (lines); - if (ret == NULL) - goto done; done: free (out); -- 1.7.11.2.249.g31c7954
Richard W.M. Jones
2012-Jul-16 08:12 UTC
[Libguestfs] [PATCH] isoinfo: remove the useless goto
On Mon, Jul 16, 2012 at 04:03:57PM +0800, Wanlong Gao wrote:> Code cleanup. > > Signed-off-by: Wanlong Gao <gaowanlong at cn.fujitsu.com> > --- > daemon/isoinfo.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/daemon/isoinfo.c b/daemon/isoinfo.c > index c0ee1c9..fd777bd 100644 > --- a/daemon/isoinfo.c > +++ b/daemon/isoinfo.c > @@ -255,8 +255,6 @@ isoinfo (const char *path) > goto done; > > ret = parse_isoinfo (lines); > - if (ret == NULL) > - goto done; > > done: > free (out);The goto helps maintenance. In future we might add more lines between the 'goto' and the 'done:' label. In any case, the compiler can easily work out that this is useless and optimize it away. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones New in Fedora 11: Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 70 libraries supprt'd http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw
Maybe Matching Threads
- [PATCH V4] NEW API: add new api xfs_info
- [PATCH] fuse:remove the unused macro when fuse is not available
- [PATCH] appliance: add cdrkit-cdrtools-compat on openSUSE
- [PATCH 1/5] mount: add a macro to resolve path or device
- Re: [PATCH v4 1/9] lib/osinfo.c: Extract xml processing into a callback