3 ms·
From the article: "I chose int for the length rather than size_t because it’s a password and should not even approach INT_MAX." That's the wrong reason to pick
by paulmooreparks 6y ago
From the article: "I chose int for the length rather than size_t because it’s a password and should not even approach INT_MAX."
That's the wrong reason to pick int over size_t. Am I missing something?
(EDIT) Especially since he calls it this way in the sample:
int len = read_password(password, sizeof(password), "password: ");