[libvirt] [PATCH] pciFindStubDriver should return NULL on error

pciFindStubDriver currently returns 0 in one of the error cases. While it's correct...NULL is more readable. Signed-off-by: Chris Wright <chrisw@redhat.com> --- src/util/pci.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/util/pci.c b/src/util/pci.c index a559476..22c66fa 100644 --- a/src/util/pci.c +++ b/src/util/pci.c @@ -826,7 +826,7 @@ recheck: char ebuf[1024]; VIR_WARN("failed to load pci-stub or pciback drivers: %s", virStrerror(errno, ebuf, sizeof ebuf)); - return 0; + return NULL; } goto recheck;

On 09/22/2010 04:54 PM, Chris Wright wrote:
pciFindStubDriver currently returns 0 in one of the error cases. While it's correct...NULL is more readable.
Signed-off-by: Chris Wright<chrisw@redhat.com> --- src/util/pci.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/util/pci.c b/src/util/pci.c index a559476..22c66fa 100644 --- a/src/util/pci.c +++ b/src/util/pci.c @@ -826,7 +826,7 @@ recheck: char ebuf[1024]; VIR_WARN("failed to load pci-stub or pciback drivers: %s", virStrerror(errno, ebuf, sizeof ebuf)); - return 0; + return NULL;
ACK. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
participants (2)
-
Chris Wright
-
Eric Blake