tests: Better way to ensure 'g' is used and return success or error.

This commit is contained in:
Richard W.M. Jones
2012-07-11 23:55:11 +01:00
parent 39d1a7dbc9
commit 7a0478bed0
2 changed files with 2 additions and 4 deletions

View File

@@ -30,6 +30,5 @@ int
main (int argc, char *argv[])
{
guestfs_h *g = guestfs_create ();
(void) g; /* trick shamelessly stolen from gnulib */
return 0;
return g != NULL ? 0 : 1;
}

View File

@@ -26,6 +26,5 @@ int
main (int argc, char *argv[])
{
guestfs_h *g = guestfs_create ();
(void) g; /* trick shamelessly stolen from gnulib */
return 0;
return g != NULL ? 0 : 1;
}