Skip to content

Commit

Permalink
fixup! Augment rand argument parsing to allow scaling
Browse files Browse the repository at this point in the history
  • Loading branch information
nhorman committed Nov 9, 2023
1 parent 412b8e9 commit b273c3d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions apps/rand.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,10 @@ int rand_main(int argc, char **argv)
* any non-numerical chars
* A non digit suffix indicates we need to shift the
* number of requested bytes by a factor of:
* k = 1024^1 (1 << (10 * 1))
* m = 1024^2 (1 << (10 * 2))
* g = 1024^3 (1 << (10 * 3))
* t = 1024^4 (1 << (10 * 4))
* K = 1024^1 (1 << (10 * 1))
* M = 1024^2 (1 << (10 * 2))
* G = 1024^3 (1 << (10 * 3))
* T = 1024^4 (1 << (10 * 4))
* which can be achieved by bit-shifting the number
*/
while (argv[0][factoridx]) {
Expand Down

0 comments on commit b273c3d

Please sign in to comment.