summaryrefslogtreecommitdiffstats
path: root/contrib/libarchive/libarchive/archive_write_set_format_pax.c
diff options
context:
space:
mode:
authormm <mm@FreeBSD.org>2012-07-28 06:38:44 +0000
committermm <mm@FreeBSD.org>2012-07-28 06:38:44 +0000
commit11bb7fcf7b175da111e710d49b6e1c30153b625b (patch)
tree1ed0c7ff98605ecfbedcfa8d00cd1a29e2dfebe6 /contrib/libarchive/libarchive/archive_write_set_format_pax.c
parentf694295168072660e04cabb712367c5a73b59885 (diff)
parente7b24010c4d2190a1465594620e629e469c522f8 (diff)
downloadFreeBSD-src-11bb7fcf7b175da111e710d49b6e1c30153b625b.zip
FreeBSD-src-11bb7fcf7b175da111e710d49b6e1c30153b625b.tar.gz
Update libarchive to 3.0.4
Diffstat (limited to 'contrib/libarchive/libarchive/archive_write_set_format_pax.c')
-rw-r--r--contrib/libarchive/libarchive/archive_write_set_format_pax.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/contrib/libarchive/libarchive/archive_write_set_format_pax.c b/contrib/libarchive/libarchive/archive_write_set_format_pax.c
index 15e92e9..459af72 100644
--- a/contrib/libarchive/libarchive/archive_write_set_format_pax.c
+++ b/contrib/libarchive/libarchive/archive_write_set_format_pax.c
@@ -334,8 +334,7 @@ archive_write_pax_header_xattrs(struct archive_write *a,
url_encoded_name = url_encode(name);
if (url_encoded_name != NULL) {
/* Convert narrow-character to UTF-8. */
- r = archive_strcpy_in_locale(
- &(pax->l_url_encoded_name),
+ r = archive_strcpy_l(&(pax->l_url_encoded_name),
url_encoded_name, pax->sconv_utf8);
free(url_encoded_name); /* Done with this. */
if (r == 0)
@@ -1324,7 +1323,7 @@ archive_write_pax_header(struct archive_write *a,
return (ARCHIVE_FATAL);
}
/* Pad out the end of the entry. */
- r = __archive_write_nulls(a, pax->entry_padding);
+ r = __archive_write_nulls(a, (size_t)pax->entry_padding);
if (r != ARCHIVE_OK) {
/* If a write fails, we're pretty much toast. */
return (ARCHIVE_FATAL);
@@ -1666,7 +1665,7 @@ archive_write_pax_finish_entry(struct archive_write *a)
pax->sparse_list = sb;
}
}
- ret = __archive_write_nulls(a, remaining + pax->entry_padding);
+ ret = __archive_write_nulls(a, (size_t)(remaining + pax->entry_padding));
pax->entry_bytes_remaining = pax->entry_padding = 0;
return (ret);
}
@@ -1713,7 +1712,7 @@ archive_write_pax_data(struct archive_write *a, const void *buff, size_t s)
p = ((const unsigned char *)buff) + total;
ws = s - total;
if (ws > pax->sparse_list->remaining)
- ws = pax->sparse_list->remaining;
+ ws = (size_t)pax->sparse_list->remaining;
if (pax->sparse_list->is_hole) {
/* Current block is hole thus we do not write
OpenPOWER on IntegriCloud