[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [libvirt] [PATCH] Fix compiler warnings in test code
- From: "Daniel P. Berrange" <berrange redhat com>
- To: john levon sun com
- Cc: libvir-list redhat com
- Subject: Re: [libvirt] [PATCH] Fix compiler warnings in test code
- Date: Thu, 18 Dec 2008 12:25:43 +0000
On Wed, Dec 17, 2008 at 03:17:35PM +0000, Daniel P. Berrange wrote:
> On Tue, Dec 16, 2008 at 06:51:14PM -0800, john levon sun com wrote:
> > # HG changeset patch
> > # User john levon sun com
> > # Date 1229399267 28800
> > # Node ID 1b81ac255ad765ab782829e7fe0a55dc7bab72ab
> > # Parent ee6ccfc062f49f514d7ae8924d5a596b18441fee
> > Fix compiler warnings in test code
> >
> > Signed-off-by: John Levon <john levon sun com>
> >
> > diff --git a/src/test.c b/src/test.c
> > --- a/src/test.c
> > +++ b/src/test.c
> > @@ -1299,7 +1299,7 @@ static unsigned long testGetMaxMemory(vi
> > static unsigned long testGetMaxMemory(virDomainPtr domain) {
> > testConnPtr privconn = domain->conn->privateData;
> > virDomainObjPtr privdom;
> > - unsigned long ret = -1;
> > + unsigned long ret = (unsigned long)-1;
>
> The original code was actually bogus. It should have been
> initialized to '0' as the error return value, rather than
> the current '-1'.
I've committed your patch, with this additional change
Daniel
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]