Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Jun 2010 09:52:02 GMT
From:      Garrett Cooper <gcooper@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 179699 for review
Message-ID:  <201006170952.o5H9q2d0079758@repoman.freebsd.org>

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

Change 179699 by gcooper@gcooper-bayonetta on 2010/06/17 09:51:24

	Integrate fix for bug with read_plist_from_buffer where the return code
	was being incorrectly checked for ARCHIVE_OK, not the number of bytes
	returned.
	
	style(9) fix it a bit though.
	
	Committed-by: jlaffaye@.

Affected files ...

.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/lib/libpkg/file.c#22 integrate

Differences ...

==== //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/lib/libpkg/file.c#22 (text+ko) ====

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



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