From: Anton G. <agl...@pa...> - 2008-03-19 08:52:46
|
> > + case 'i': > > + iterations = atoi(v); > should be checking for a -ve value? > > + break; > > case 'h': > > usage(); > > exit(0); > > @@ -167,12 +171,16 @@ int main(int argc, char *argv[]) > > int i; > > setup(); > > > > - rt_init("jh", parse_args, argc, argv); > > + rt_init("jhi:", parse_args, argc, argv); > > + > > + if (iterations < 100) { > > + fprintf(stderr, "Iteration cannot be less than 100.\n"); > > + } This check will cover negative values. -- Best regards, anton mailto:agl...@sw... |