Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Aug 2008 22:10:23 GMT
From:      Anselm Strauss <strauss@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 147613 for review
Message-ID:  <200808162210.m7GMANKO089686@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200808162210.m7GMANKO089686>