PERFORCE change 179699 for review

Garrett Cooper gcooper at FreeBSD.org
Thu Jun 17 09:52:03 UTC 2010


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

Change 179699 by gcooper at 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 at .

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);
 
 					}


More information about the p4-projects mailing list