PERFORCE change 179228 for review

Julien Laffaye jlaffaye at FreeBSD.org
Sat Jun 5 18:17:23 UTC 2010


http://p4web.freebsd.org/@@179228?ac=10

Change 179228 by jlaffaye at jlaffaye-chulak on 2010/06/05 18:17:16

	archive_read_data() returns the number of read bytes and not a status.
	Fixed a logic error;

Affected files ...

.. //depot/projects/soc2010/pkg_complete/lib/libpkg/file.c#5 edit

Differences ...

==== //depot/projects/soc2010/pkg_complete/lib/libpkg/file.c#5 (text+ko) ====

@@ -346,11 +346,11 @@
 	Boolean found_match = FALSE;
 
 	size_t buf_size = 0;
+	size_t r;
 
 	const char *entry_pathname = NULL;
 	const char *error = NULL;
 	int archive_fd = -1;
-	int r;
 
 	errno = 0;
 
@@ -411,7 +411,7 @@
 						r = archive_read_data(archive,
 						    *buf, buf_size);
 
-						if (r != ARCHIVE_OK) {
+						if (r != buf_size) {
 							error = archive_error_string(archive);
 							buf_size = 0;
 						}


More information about the p4-projects mailing list