Date: Mon, 28 Mar 2005 19:51:39 GMT From: Derek Tattersall <dtatters@gmail.conm> To: freebsd-gnats-submit@FreeBSD.org Subject: misc/79318: Example in archive_read man page is incorrect Message-ID: <200503281951.j2SJpdb2046513@www.freebsd.org> Resent-Message-ID: <200503282000.j2SK06NW041298@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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@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@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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200503281951.j2SJpdb2046513>