2
0
Fork 0
mirror of https://git.sr.ht/~sircmpwn/mkproof synced 2024-05-12 18:56:22 +02:00

mkproof: use unsigned long for attempt count

This commit is contained in:
Drew DeVault 2020-11-25 12:22:03 -05:00
parent 773cdb5582
commit 1f58a37098

View File

@ -73,11 +73,11 @@ main(int argc, char *argv[])
fprintf(stderr, "This may take anywhere from tens of seconds to a few hours on slow computers.\n");
}
int nattempts = 0;
unsigned long nattempts = 0;
int valid = 0;
while (!valid) {
if (isatty(STDERR_FILENO)) {
fprintf(stderr, "\rAttempt %d", ++nattempts);
fprintf(stderr, "\rAttempt %lu", ++nattempts);
}
ssize_t b = get_random_bytes(password, sizeof(password));