test-tool: guestfs_get_path might return NULL.

It would almost certainly indicate a bug if it happens, but
don't rely on printf not segfaulting if it did happen.
This commit is contained in:
Richard W.M. Jones
2012-09-26 12:26:28 +01:00
parent b44d82ec8d
commit ca2e65275d

View File

@@ -211,7 +211,7 @@ main (int argc, char *argv[])
printf ("guestfs_get_direct: %d\n", guestfs_get_direct (g));
printf ("guestfs_get_memsize: %d\n", guestfs_get_memsize (g));
printf ("guestfs_get_network: %d\n", guestfs_get_network (g));
printf ("guestfs_get_path: %s\n", guestfs_get_path (g));
printf ("guestfs_get_path: %s\n", guestfs_get_path (g) ? : "(null)");
printf ("guestfs_get_pgroup: %d\n", guestfs_get_pgroup (g));
printf ("guestfs_get_qemu: %s\n", guestfs_get_qemu (g));
printf ("guestfs_get_recovery_proc: %d\n", guestfs_get_recovery_proc (g));