- Notifications
You must be signed in to change notification settings - Fork5k
Commit53a2a15
committed
pgbench: Make set_random_seed() 64-bit everywhere.
Delete an intermediate variable, a redundant cast, a use of long and ause of long long. scanf() the seed directly into a uint64, now that wecan do that with SCNu64 from <inttypes.h>.The previous coding was from pre-C99 times when %lld might not have beenthere, so it read into an unsigned long. Therefore behavior variedby OS, and --random-seed would accept either 32 or 64 bit seeds. Nowit's the same everywhere.Author: Thomas Munro <thomas.munro@gmail.com>Discussion:https://postgr.es/m/b936d2fb-590d-49c3-a615-92c3a88c6c19%40eisentraut.org1 parentd70b176 commit53a2a15
1 file changed
+3
-7
lines changedLines changed: 3 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6634 | 6634 |
| |
6635 | 6635 |
| |
6636 | 6636 |
| |
6637 |
| - | |
6638 |
| - | |
6639 | 6637 |
| |
6640 | 6638 |
| |
6641 |
| - | |
6642 |
| - | |
| 6639 | + | |
6643 | 6640 |
| |
6644 | 6641 |
| |
6645 | 6642 |
| |
6646 | 6643 |
| |
6647 | 6644 |
| |
6648 |
| - | |
6649 | 6645 |
| |
6650 | 6646 |
| |
6651 | 6647 |
| |
6652 |
| - | |
| 6648 | + | |
6653 | 6649 |
| |
6654 | 6650 |
| |
6655 | 6651 |
| |
6656 | 6652 |
| |
6657 |
| - | |
| 6653 | + | |
6658 | 6654 |
| |
6659 | 6655 |
| |
6660 | 6656 |
| |
|
0 commit comments
Comments
(0)