diff options
author | Marc-André Lureau <marcandre.lureau@gmail.com> | 2012-12-14 23:41:23 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2013-01-09 13:56:06 +0100 |
commit | c718c49e670fe84f73bcb9e690abe472689fa795 (patch) | |
tree | a829284cb08ea10caffa8e9d656d687bd52d1a8d /tools/msibuild.c | |
parent | a8feb19012febcb033ba74850a6369af08ff2627 (diff) | |
download | msitools-c718c49e670fe84f73bcb9e690abe472689fa795.tar.gz msitools-c718c49e670fe84f73bcb9e690abe472689fa795.tar.xz msitools-c718c49e670fe84f73bcb9e690abe472689fa795.zip |
query: make libmsi_query_execute() return bool directly and GError
Diffstat (limited to 'tools/msibuild.c')
-rw-r--r-- | tools/msibuild.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/tools/msibuild.c b/tools/msibuild.c index e8b9e75..af717b0 100644 --- a/tools/msibuild.c +++ b/tools/msibuild.c @@ -190,9 +190,8 @@ static int add_stream(const char *stream, const char *file, GError **error) if (r != LIBMSI_RESULT_SUCCESS) fprintf(stderr, "failed to open query (%u)\n", r); - r = libmsi_query_execute(query, rec); - if (r != LIBMSI_RESULT_SUCCESS) - fprintf(stderr, "failed to execute query (%u)\n", r); + if (!libmsi_query_execute(query, rec, error)) + fprintf(stderr, "failed to execute query\n"); g_object_unref(rec); libmsi_query_close(query, error); @@ -212,9 +211,8 @@ static int do_query(const char *sql, void *opaque) return r; } - r = libmsi_query_execute(query, NULL); - if (r != LIBMSI_RESULT_SUCCESS) - fprintf(stderr, "failed to execute query (%u)\n", r); + if (!libmsi_query_execute(query, NULL, error)) + fprintf(stderr, "failed to execute query\n"); libmsi_query_close(query, error); g_object_unref(query); |