From fca385ca81ea92e6b9dbbb0d1794cfafa35ababc Mon Sep 17 00:00:00 2001 From: Arne Juul Date: Thu, 2 Jul 2020 12:34:06 +0000 Subject: avoid naked exit --- vespalib/src/tests/stllike/uniq_by_sort_map_hash.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'vespalib') diff --git a/vespalib/src/tests/stllike/uniq_by_sort_map_hash.cpp b/vespalib/src/tests/stllike/uniq_by_sort_map_hash.cpp index 3041627b2d0..0141e32e435 100644 --- a/vespalib/src/tests/stllike/uniq_by_sort_map_hash.cpp +++ b/vespalib/src/tests/stllike/uniq_by_sort_map_hash.cpp @@ -310,13 +310,13 @@ int main(int argc, char *argv[]) } else { std::vector threads(numThreads); for (size_t j(0); j < numThreads; j++) { - pthread_create(&threads[j], NULL, (VFUNC)runBenchMark, &indirectSlotVector); + pthread_create(&threads[j], NULL, (VFUNC)runBenchMark, &indirectSlotVector); } for (size_t j(0); j < numThreads; j++) { pthread_join(threads[j], NULL); } } - break; + break; default: printf("'m' = %s\n", description[type]); printf("'M' = %s\n", description[type]); @@ -327,11 +327,10 @@ int main(int argc, char *argv[]) printf("'g' = %s\n", description[type]); printf("'G' = %s\n", description[type]); printf("'J' = %s\n", description[type]); - printf("Unspecified type %c. Running map benchmark\n", type); - exit(1); - break; + printf("Unspecified type %c.\n", type); + return 1; } } printf("Running test '%c' = %s, result = %ld unique values\n", type, description[type], uniq); + return 0; } - -- cgit v1.2.3