On 05/18/2010 04:33 AM, Jim Meyering wrote: > Simple... > >>From f5ee09ed08473478b3ea3135d51125fbf687e402 Mon Sep 17 00:00:00 2001 > From: Jim Meyering <meyering@xxxxxxxxxx> > Date: Tue, 18 May 2010 12:32:39 +0200 > Subject: [PATCH] tests: do not ignore virInitialize failure > > * tests/nodeinfotest.c (mymain): Do not ignore virInitialize failure. > Most other callers of virInitialize test for failure. > --- > tests/nodeinfotest.c | 3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/tests/nodeinfotest.c b/tests/nodeinfotest.c > index ff056b9..d3c500d 100644 > --- a/tests/nodeinfotest.c > +++ b/tests/nodeinfotest.c > @@ -106,7 +106,8 @@ mymain(int argc, char **argv) > return(EXIT_FAILURE); > } > > - virInitialize(); > + if (virInitialize() < 0) > + return EXIT_FAILURE; Shouldn't we be adding ATTRIBUTE_RETURN_CHECK to virInitialize in the appropriate header, to let the compiler enforce us to do the checking? ACK with that addition. -- Eric Blake eblake@xxxxxxxxxx +1-801-349-2682 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list