[Pkg-libvirt-commits] [libguestfs] 51/61: fish: Check return values from a couple of API calls.

Hilko Bengen bengen at moszumanska.debian.org
Sat Mar 29 14:36:32 UTC 2014


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to branch experimental
in repository libguestfs.

commit a20e368fea11fec1a2927670bbe3035ad0bcf4c1
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Thu Mar 27 11:34:37 2014 +0000

    fish: Check return values from a couple of API calls.
    
    Found by Coverity.
---
 fish/fish.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/fish/fish.c b/fish/fish.c
index 1e5dab6..1b6f109 100644
--- a/fish/fish.c
+++ b/fish/fish.c
@@ -434,7 +434,8 @@ main (int argc, char *argv[])
     sigaction (SIGINT, &sa, NULL);
     sigaction (SIGQUIT, &sa, NULL);
 
-    guestfs_set_pgroup (g, 1);
+    if (guestfs_set_pgroup (g, 1) == -1)
+      exit (EXIT_FAILURE);
   }
 
   /* Old-style -i syntax?  Since -a/-d/-N and -i was disallowed
@@ -489,8 +490,10 @@ main (int argc, char *argv[])
      * solution would be to call launch () etc after the fork, but
      * that greatly complicates the code here).
      */
-    if (remote_control_listen)
-      guestfs_set_recovery_proc (g, 0);
+    if (remote_control_listen) {
+      if (guestfs_set_recovery_proc (g, 0) == -1)
+        exit (EXIT_FAILURE);
+    }
 
     if (launch () == -1) exit (EXIT_FAILURE);
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list