From owner-p4-projects@FreeBSD.ORG Sat Aug 16 22:10:24 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 42425106566C; Sat, 16 Aug 2008 22:10:24 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 05EE9106566B for ; Sat, 16 Aug 2008 22:10:24 +0000 (UTC) (envelope-from strauss@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id E5D198FC1E for ; Sat, 16 Aug 2008 22:10:23 +0000 (UTC) (envelope-from strauss@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.2/8.14.2) with ESMTP id m7GMANYj089688 for ; Sat, 16 Aug 2008 22:10:23 GMT (envelope-from strauss@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.2/8.14.1/Submit) id m7GMANKO089686 for perforce@freebsd.org; Sat, 16 Aug 2008 22:10:23 GMT (envelope-from strauss@FreeBSD.org) Date: Sat, 16 Aug 2008 22:10:23 GMT Message-Id: <200808162210.m7GMANKO089686@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to strauss@FreeBSD.org using -f From: Anselm Strauss To: Perforce Change Reviews Cc: Subject: PERFORCE change 147613 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Aug 2008 22:10:24 -0000 http://perforce.freebsd.org/chv.cgi?CH=147613 Change 147613 by strauss@strauss_marvelman on 2008/08/16 22:10:17 Fix: Did not count written data bytes. Affected files ... .. //depot/projects/soc2008/strauss_libarchive/libarchive/archive_write_set_format_zip.c#38 edit .. //depot/projects/soc2008/strauss_libarchive/libarchive/test/test_write_format_zip.c#3 edit Differences ... ==== //depot/projects/soc2008/strauss_libarchive/libarchive/archive_write_set_format_zip.c#38 (text+ko) ==== @@ -323,8 +323,9 @@ ret = (a->compressor.write)(a, buff, s); if (ret >= 0) { zip->written_bytes += s; + zip->remaining_data_bytes -= s; l->crc32 = crc32(l->crc32, buff, s); - return s; + return (s); } else { return (ret); } ==== //depot/projects/soc2008/strauss_libarchive/libarchive/test/test_write_format_zip.c#3 (text+ko) ==== @@ -62,6 +62,7 @@ assertEqualInt(0, archive_write_header(a, ae)); archive_entry_free(ae); assertEqualInt(8, archive_write_data(a, "12345678", 9)); + assertEqualInt(0, archive_write_data(a, "1", 1)); /* * Write another file to it.