https://bugzilla.kernel.org/show_bug.cgi?id=215097
--- Comment #3 from Alejandro Colomar (man-pages) (alx.manpages@gmail.com) ---
Makes sense. Fixed.
I'll keep the bug open until I fix sysconf(3) too.
Thanks!
Alex
getpwnam.3: EXAMPLES: Fix signedness
sysconf(3) returns a long. Since it can return -1 (and we're
making use of that value), we can't use size_t for bufsize.
Use long.
Link: <https://bugzilla.kernel.org/show_bug.cgi?id=215097>
Reported-by: Fabian [off-list ref]
Signed-off-by: Alejandro Colomar [off-list ref]
diff --git a/man3/getpwnam.3 b/man3/getpwnam.3
index 71457a916..8ca13f1a2 100644
--- a/man3/getpwnam.3
+++ b/man3/getpwnam.3
@@ -304,7 +304,7 @@ main(int argc, char *argv[])
struct passwd pwd;
struct passwd *result;
char *buf;
- size_t bufsize;
+ long bufsize;
int s;
if (argc != 2) {
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.