diff options
Diffstat (limited to 'storage/mroonga/vendor/groonga/benchmark/bench-table-factory.c')
-rw-r--r-- | storage/mroonga/vendor/groonga/benchmark/bench-table-factory.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/storage/mroonga/vendor/groonga/benchmark/bench-table-factory.c b/storage/mroonga/vendor/groonga/benchmark/bench-table-factory.c index 7e06874dffd..9e378f5530b 100644 --- a/storage/mroonga/vendor/groonga/benchmark/bench-table-factory.c +++ b/storage/mroonga/vendor/groonga/benchmark/bench-table-factory.c @@ -1,6 +1,6 @@ /* -*- c-basic-offset: 2; coding: utf-8 -*- */ /* - Copyright (C) 2008 Kouhei Sutou <kou@cozmixng.org> + Copyright (C) 2008-2016 Kouhei Sutou <kou@clear-code.com> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -17,6 +17,7 @@ */ #include <string.h> +#include <stdlib.h> #include <groonga.h> @@ -226,11 +227,17 @@ bench_teardown(gpointer user_data) int main(int argc, gchar **argv) { + grn_rc rc; BenchmarkData data; BenchReporter *reporter; gint n = 100; - grn_init(); + rc = grn_init(); + if (rc != GRN_SUCCESS) { + g_print("failed to initialize Groonga: <%d>: %s\n", + rc, grn_get_global_error_message()); + return EXIT_FAILURE; + } bench_init(&argc, &argv); data.context = g_new(grn_ctx, 1); @@ -266,5 +273,5 @@ main(int argc, gchar **argv) bench_quit(); grn_fin(); - return 0; + return EXIT_SUCCESS; } |