Bug 837090
| Summary: | Man page for inet_aton provides incorrect example | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | W. Michael Petullo <mike> |
| Component: | man-pages | Assignee: | Peter Schiffer <pschiffe> |
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 17 | CC: | mtk.manpages, pschiffe |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2012-09-25 06:21:57 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
rawhide build: man-pages-3.42-1.fc19 http://koji.fedoraproject.org/koji/buildinfo?buildID=355232 man-pages-3.42-1.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/man-pages-3.42-1.fc18 Package man-pages-3.42-1.fc18: * should fix your issue, * was pushed to the Fedora 18 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing man-pages-3.42-1.fc18' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-14421/man-pages-3.42-1.fc18 then log in and leave karma (feedback). man-pages-3.35-3.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/man-pages-3.35-3.fc17 man-pages-3.35-4.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/man-pages-3.35-4.fc17 man-pages-3.42-1.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report. I've applied the following upstream:
diff --git a/man3/inet.3 b/man3/inet.3
index c4b3200..51ca844 100644
--- a/man3/inet.3
+++ b/man3/inet.3
@@ -286,7 +286,7 @@ main(int argc, char *argv[])
}
if (inet_aton(argv[1], &addr) == 0) {
- perror("inet_aton");
+ fprintf(stderr, "Invalid address\\n");
exit(EXIT_FAILURE);
}
|
Description of problem: The man page for inet_aton provides an incorrect example: [...] if (inet_aton(argv[1], &addr) == 0) { perror("inet_aton"); exit(EXIT_FAILURE); } [...] Version-Release number of selected component (if applicable): man-pages-3.35-2.fc17.noarch How reproducible: Every time Steps to Reproduce: 1. man inet_aton 2. Compile example from man page to a.out Actual results: > ./a.out not-an-ip-address inet_aton: Success Expected results: The example should not recommend using perror. inet_aton is not a system call and perror prints "Success" even on an error. Instead, the example should use fprintf (stderr, ...). Additional info: