summaryrefslogtreecommitdiff
path: root/storage/mroonga/vendor/groonga/benchmark/bench-geo-distance.c
diff options
context:
space:
mode:
Diffstat (limited to 'storage/mroonga/vendor/groonga/benchmark/bench-geo-distance.c')
-rw-r--r--storage/mroonga/vendor/groonga/benchmark/bench-geo-distance.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/storage/mroonga/vendor/groonga/benchmark/bench-geo-distance.c b/storage/mroonga/vendor/groonga/benchmark/bench-geo-distance.c
index 72d1d79b73f..f77cfb1d3e7 100644
--- a/storage/mroonga/vendor/groonga/benchmark/bench-geo-distance.c
+++ b/storage/mroonga/vendor/groonga/benchmark/bench-geo-distance.c
@@ -1,6 +1,6 @@
/* -*- c-basic-offset: 2; coding: utf-8 -*- */
/*
- Copyright (C) 2009 Kouhei Sutou <kou@clear-code.com>
+ Copyright (C) 2009-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
@@ -48,6 +48,7 @@
*/
#include <string.h>
+#include <stdlib.h>
#include <grn_db.h>
#include <groonga.h>
@@ -421,11 +422,17 @@ bench_teardown(gpointer user_data)
int
main(int argc, gchar **argv)
{
+ grn_rc rc;
BenchmarkData data;
BenchReporter *reporter;
gint n = 1000;
- 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.report_result = g_getenv("GROONGA_BENCH_REPORT_RESULT") != NULL;
@@ -495,5 +502,5 @@ main(int argc, gchar **argv)
bench_quit();
grn_fin();
- return 0;
+ return EXIT_SUCCESS;
}