From: Jim Meyering Date: Thu, 3 Sep 2009 12:09:49 +0000 (+0200) Subject: python: let libvirt_virConnectDomainEventCallback indicate success X-Git-Tag: v0.7.1~110 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0fa4d6298672d94ab2b47b606111b484ad0f2fc4;p=thirdparty%2Flibvirt.git python: let libvirt_virConnectDomainEventCallback indicate success * python/libvir.c (libvirt_virConnectDomainEventCallback): Return 0 when successful, rather than always returning -1. clang flagged this function for its dead-store of "ret=0". Once "ret" was set to 0, it was never used, and the function would always return -1. --- diff --git a/python/libvir.c b/python/libvir.c index e2c196a693..0c00b806b0 100644 --- a/python/libvir.c +++ b/python/libvir.c @@ -4,7 +4,7 @@ * entry points where an automatically generated stub is * unpractical * - * Copyright (C) 2005, 2007, 2008 Red Hat, Inc. + * Copyright (C) 2005, 2007-2009 Red Hat, Inc. * * Daniel Veillard */ @@ -1812,7 +1812,7 @@ libvirt_virConnectDomainEventCallback(virConnectPtr conn ATTRIBUTE_UNUSED, cleanup: LIBVIRT_RELEASE_THREAD_STATE; - return -1; + return ret; } static PyObject *