PERFORCE change 147613 for review
Anselm Strauss
strauss at FreeBSD.org
Sat Aug 16 22:10:24 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=147613
Change 147613 by strauss at 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.
More information about the p4-projects
mailing list