X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2Ftstlogthread.c;h=49b384ebf26ea9b3df7193ecfada7341edf1b99e;hb=67471e87c134f2503546cdd250cd169b7d43d566;hp=6241d81a086dfdb486b92d25d1fa16617cb4020b;hpb=9eca093a375190581d3ce6b4eb119dadd39692eb;p=yaz-moved-to-github.git diff --git a/test/tstlogthread.c b/test/tstlogthread.c index 6241d81..49b384e 100644 --- a/test/tstlogthread.c +++ b/test/tstlogthread.c @@ -2,7 +2,7 @@ * Copyright (c) 1998-2005, Index Data. * See the file LICENSE for details. * - * $Id: tstlogthread.c,v 1.2 2005-09-08 13:51:27 adam Exp $ + * $Id: tstlogthread.c,v 1.4 2006-10-09 14:22:44 heikki Exp $ */ #if HAVE_CONFIG_H @@ -33,7 +33,7 @@ static void *t_loop2(void *vp) return 0; } -static void t_test() +static void t_test(void) { pthread_t tids[4]; @@ -60,6 +60,7 @@ int main(int argc, char **argv) char *arg; int ret; + /* t_test is only invoked if a non-option arg is given .. */ while ((ret = options("v:l:", argv, argc, &arg)) != -2) { switch (ret) @@ -70,11 +71,13 @@ int main(int argc, char **argv) case 'l': yaz_log_init_file(arg); break; + case 0: + t_test(); + break; default: - return 1; + exit(1); } } - t_test(); return 0; } /*