Commit 80ad850
pgbench: Make set_random_seed() 64-bit everywhere.
Delete an intermediate variable, a redundant cast, a use of long and a
use of long long. scanf() the seed directly into a uint64, now that we
can do that with SCNu64 from <inttypes.h>.
The previous coding was from pre-C99 times when %lld might not have been
there, so it read into an unsigned long. Therefore behavior varied
by OS, and --random-seed would accept either 32 or 64 bit seeds. Now
it's the same everywhere.1 parent e003384 commit 80ad850
1 file changed
+3
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6639 | 6639 | | |
6640 | 6640 | | |
6641 | 6641 | | |
6642 | | - | |
6643 | | - | |
6644 | 6642 | | |
6645 | 6643 | | |
6646 | | - | |
6647 | | - | |
| 6644 | + | |
6648 | 6645 | | |
6649 | 6646 | | |
6650 | 6647 | | |
6651 | 6648 | | |
6652 | 6649 | | |
6653 | | - | |
6654 | 6650 | | |
6655 | 6651 | | |
6656 | 6652 | | |
6657 | | - | |
| 6653 | + | |
6658 | 6654 | | |
6659 | 6655 | | |
6660 | 6656 | | |
6661 | 6657 | | |
6662 | | - | |
| 6658 | + | |
6663 | 6659 | | |
6664 | 6660 | | |
6665 | 6661 | | |
| |||
0 commit comments