summaryrefslogtreecommitdiffstats
path: root/programs/frametest.c
diff options
context:
space:
mode:
Diffstat (limited to 'programs/frametest.c')
-rw-r--r--programs/frametest.c33
1 files changed, 15 insertions, 18 deletions
diff --git a/programs/frametest.c b/programs/frametest.c
index 6204d7a..60cd765 100644
--- a/programs/frametest.c
+++ b/programs/frametest.c
@@ -726,7 +726,7 @@ int FUZ_usage(void)
DISPLAY( "\n");
DISPLAY( "Arguments :\n");
DISPLAY( " -i# : Nb of tests (default:%u) \n", nbTestsDefault);
- DISPLAY( " -T# : Duration of tests (default: use Nb of tests) \n");
+ DISPLAY( " -T# : Duration of tests, in seconds (default: use Nb of tests) \n");
DISPLAY( " -s# : Select seed (default:prompt user)\n");
DISPLAY( " -t# : Select starting test number (default:0)\n");
DISPLAY( " -p# : Select compressibility in %% (default:%i%%)\n", FUZ_COMPRESSIBILITY_DEFAULT);
@@ -800,26 +800,23 @@ int main(int argc, char** argv)
case 'T':
argument++;
nbTests = 0; duration = 0;
-
for (;;)
{
- if (argument[0]=='m')
- {
- duration *= 60;
- argument++;
- continue;
- }
- if (argument[0]=='n')
- {
- argument++;
- continue;
- }
- if ((*argument>='0') && (*argument<='9'))
+ switch(*argument)
{
- duration *= 10;
- duration += *argument - '0';
- argument++;
- continue;
+ case 'm': duration *= 60; argument++; continue;
+ case 's':
+ case 'n': argument++; continue;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9': duration *= 10; duration += *argument++ - '0'; continue;
}
break;
}