Skip to content

Commit

Permalink
Fix issue RedisLabs#211. Read key_stddev and key_median arguments as …
Browse files Browse the repository at this point in the history
…double
  • Loading branch information
clkbug committed Apr 17, 2023
1 parent 1620979 commit c5f2ddc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions memtier_benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -694,15 +694,15 @@ static int config_parse_args(int argc, char *argv[], struct benchmark_config *cf
break;
case o_key_stddev:
endptr = NULL;
cfg->key_stddev = (unsigned int) strtof(optarg, &endptr);
cfg->key_stddev = strtod(optarg, &endptr);
if (cfg->key_stddev<= 0 || !endptr || *endptr != '\0') {
fprintf(stderr, "error: key-stddev must be greater than zero.\n");
return -1;
}
break;
case o_key_median:
endptr = NULL;
cfg->key_median = (unsigned int) strtof(optarg, &endptr);
cfg->key_median = strtod(optarg, &endptr);
if (cfg->key_median<= 0 || !endptr || *endptr != '\0') {
fprintf(stderr, "error: key-median must be greater than zero.\n");
return -1;
Expand Down

0 comments on commit c5f2ddc

Please sign in to comment.