aboutsummaryrefslogtreecommitdiff
path: root/lib/libarchive/archive_string.c
diff options
context:
space:
mode:
authorTim Kientzle <kientzle@FreeBSD.org>2009-12-28 02:33:22 +0000
committerTim Kientzle <kientzle@FreeBSD.org>2009-12-28 02:33:22 +0000
commit13f322aec3581063146ed74745ebfedd0830ca49 (patch)
tree26accf2f2741283b718b643c63dc06bc7a8fa0fb /lib/libarchive/archive_string.c
parentcc1e3ebe54ee5f8b9cdb91e7e1b7257754a317dd (diff)
Remove an unused variable and an unnecessary increment.
Notes
Notes: svn path=/head/; revision=201095
Diffstat (limited to 'lib/libarchive/archive_string.c')
-rw-r--r--lib/libarchive/archive_string.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/libarchive/archive_string.c b/lib/libarchive/archive_string.c
index 111dcb1291de..d68ad5875ae7 100644
--- a/lib/libarchive/archive_string.c
+++ b/lib/libarchive/archive_string.c
@@ -291,12 +291,10 @@ __archive_string_utf8_w(struct archive_string *as)
int wc, wc2;/* Must be large enough for a 21-bit Unicode code point. */
const char *src;
int n;
- int err;
ws = (wchar_t *)malloc((as->length + 1) * sizeof(wchar_t));
if (ws == NULL)
__archive_errx(1, "Out of memory");
- err = 0;
dest = ws;
src = as->s;
while (*src != '\0') {
@@ -344,7 +342,7 @@ __archive_string_utf8_w(struct archive_string *as)
} else
*dest++ = wc;
}
- *dest++ = L'\0';
+ *dest = L'\0';
return (ws);
}