misc/79318: Example in archive_read man page is incorrect
Derek Tattersall
dtatters at gmail.conm
Mon Mar 28 12:00:09 PST 2005
>Number: 79318
>Category: misc
>Synopsis: Example in archive_read man page is incorrect
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Mon Mar 28 20:00:06 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Derek Tattersall
>Release: Current
>Organization:
>Environment:
($?=1)dlt at lorne 1076 dlt% uname -a
FreeBSD lorne.arm.org 6.0-CURRENT FreeBSD 6.0-CURRENT #24: Sun Mar 20 12:26:22 EST 2005 root at lorne.arm.org:/usr/obj/usr/src/sys/LORNE i386
>Description:
Man page, archive_read.3, has a mistake in the example code, myopen() function. The return value does not agree with the description of the routine, nor with the libarchive code.
>How-To-Repeat:
Construct an example using the code from the man page.
>Fix:
--- /usr/src/lib/libarchive/archive_read.3 Sun Feb 20 10:54:50 2005
+++ ./archive_read.3 Mon Mar 28 14:44:07 2005
@@ -389,7 +389,7 @@
struct mydata *mydata = client_data;
mydata->fd = open(mydata->name, O_RDONLY);
- return (mydata->fd >= 0);
+ return (mydata->fd >= 0 ? ARCHIVE_OK : ARCHIVE_FATAL);
}
int
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list