lib: Explicitly ignore return value from guestfs_parse_environment in guestfs_create (found by Coverity).

The purpose of adding guestfs_create_flags was so that users could
check for errors from guestfs_parse_environment if they need to.
This commit is contained in:
Richard W.M. Jones
2012-12-08 13:12:17 +00:00
parent 59b51274eb
commit aa785c85d9

View File

@@ -33,6 +33,7 @@
#endif
#include "glthread/lock.h"
#include "ignore-value.h"
#include "guestfs.h"
#include "guestfs-internal.h"
@@ -122,7 +123,7 @@ guestfs_create_flags (unsigned flags, ...)
}
if (!(flags & GUESTFS_CREATE_NO_ENVIRONMENT))
guestfs_parse_environment (g);
ignore_value (guestfs_parse_environment (g));
if (!(flags & GUESTFS_CREATE_NO_CLOSE_ON_EXIT)) {
g->close_on_exit = true;