Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Jun 2010 18:17:22 GMT
From:      Julien Laffaye <jlaffaye@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 179228 for review
Message-ID:  <201006051817.o55IHMq5020072@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@179228?ac=10

Change 179228 by jlaffaye@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;
 						}



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