Fixed: -B now gives error for values lower than 1
This commit is contained in:
@@ -139,7 +139,7 @@ int main(int argc, char** argv)
|
||||
int version_to_use = 0; // actual initial value
|
||||
_Bool colored = 0; // actual initial value
|
||||
|
||||
unsigned amount_function_called = 0; // initial values, so that the compiler doesn't complain
|
||||
int amount_function_called = 0; // initial values, so that the compiler doesn't complain
|
||||
unsigned n = 0;
|
||||
float starting_point_real = 0;
|
||||
float starting_point_imaginary = 0;
|
||||
@@ -168,7 +168,7 @@ int main(int argc, char** argv)
|
||||
|
||||
case 'B': // done, function needed
|
||||
// wird die Laufzeit der angegebenen Implementierung gemessen und ausgegeben (do this later)
|
||||
amount_function_called = strtoul(optarg,NULL,10);
|
||||
int amount_function_called = strtol(optarg,NULL,10);
|
||||
if (amount_function_called <= 0) {
|
||||
printf("Invalid benchmarking input, the value should be greater than 0\n");
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user