From: Ken Raeburn Date: Fri, 1 Jul 2011 03:26:46 +0000 (+0000) Subject: Display default values in usage message X-Git-Tag: krb5-1.10-alpha1~367 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=17fd6cbc0af9d1b8a41ba6d044034fa09bb29c57;p=krb5.git Display default values in usage message git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25008 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/tests/threads/t_rcache.c b/src/tests/threads/t_rcache.c index e543f13ed..e2d3165e1 100644 --- a/src/tests/threads/t_rcache.c +++ b/src/tests/threads/t_rcache.c @@ -45,9 +45,12 @@ struct tinfo { int idx; }; +#define DEFAULT_N_THREADS 2 +#define DEFAULT_INTERVAL 20 /* 5 * 60 */ + int init_once = 0; -int n_threads = 2; -int interval = 20 /* 5 * 60 */; +int n_threads = DEFAULT_N_THREADS; +int interval = DEFAULT_INTERVAL; int *ip; static void wait_for_tick () @@ -131,8 +134,11 @@ static void usage(void) fprintf (stderr, "usage: %s [ options ]\n", prog); fprintf (stderr, "options:\n"); fprintf (stderr, "\t-1\tcreate one rcache handle for process\n"); - fprintf (stderr, "\t-t N\tnumber of threads to create\n"); - fprintf (stderr, "\t-i N\tinterval to run test over, in seconds\n"); + fprintf (stderr, "\t-t N\tnumber of threads to create (default: %d)\n", + DEFAULT_N_THREADS); + fprintf (stderr, + "\t-i N\tinterval to run test over, in seconds (default: %d)\n", + DEFAULT_INTERVAL); exit(1); }