From owner-svn-src-head@FreeBSD.ORG Sat Apr 25 14:13:28 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A89551065679 for ; Sat, 25 Apr 2009 14:13:28 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id E7BDD8FC28 for ; Sat, 25 Apr 2009 14:13:27 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: (qmail invoked by alias); 25 Apr 2009 14:13:22 -0000 Received: from p54A3C908.dip.t-dialin.net (EHLO tron.homeunix.org) [84.163.201.8] by mail.gmx.net (mp061) with SMTP; 25 Apr 2009 16:13:22 +0200 X-Authenticated: #1673122 X-Provags-ID: V01U2FsdGVkX1/XICMSyV3XaPFDqiSMXTN4j7l3W0MusfdlyBFE+C pAIaZFOE4MzKUX Message-ID: <49F31A81.8020909@gmx.de> Date: Sat, 25 Apr 2009 16:13:21 +0200 From: Christoph Mallon User-Agent: Thunderbird 2.0.0.21 (X11/20090412) MIME-Version: 1.0 To: Tim Kientzle References: <200904170100.n3H10BQX099580@svn.freebsd.org> In-Reply-To: <200904170100.n3H10BQX099580@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.53 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r191177 - head/lib/libarchive X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2009 14:13:29 -0000 Tim Kientzle schrieb: > Author: kientzle > Date: Fri Apr 17 01:00:11 2009 > New Revision: 191177 > URL: http://svn.freebsd.org/changeset/base/191177 > > Log: > Don't match an empty file on a read error. > > Modified: > head/lib/libarchive/archive_read_support_format_empty.c > > Modified: head/lib/libarchive/archive_read_support_format_empty.c > ============================================================================== > --- head/lib/libarchive/archive_read_support_format_empty.c Fri Apr 17 00:59:34 2009 (r191176) > +++ head/lib/libarchive/archive_read_support_format_empty.c Fri Apr 17 01:00:11 2009 (r191177) > @@ -59,14 +59,13 @@ archive_read_support_format_empty(struct > static int > archive_read_format_empty_bid(struct archive_read *a) > { > + const void *h; > ssize_t avail; > > - (void)__archive_read_ahead(a, 1, &avail); > - /* Bid 1 if we successfully read exactly zero bytes. */ > - if (avail == 0) > - return (1); > - /* Otherwise, we don't bid on this. */ > - return (-1); > + h = __archive_read_ahead(a, 1, &avail); > + if (avail != 0) > + return (-1); > + return (1); > } > > static int The added variable "h" is write-only - should it get tested after the call? Christoph