Remove an unused variable and an unnecessary increment.

This commit is contained in:
Tim Kientzle 2009-12-28 02:33:22 +00:00
parent cc1e3ebe54
commit 13f322aec3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=201095

View File

@ -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. */ int wc, wc2;/* Must be large enough for a 21-bit Unicode code point. */
const char *src; const char *src;
int n; int n;
int err;
ws = (wchar_t *)malloc((as->length + 1) * sizeof(wchar_t)); ws = (wchar_t *)malloc((as->length + 1) * sizeof(wchar_t));
if (ws == NULL) if (ws == NULL)
__archive_errx(1, "Out of memory"); __archive_errx(1, "Out of memory");
err = 0;
dest = ws; dest = ws;
src = as->s; src = as->s;
while (*src != '\0') { while (*src != '\0') {
@ -344,7 +342,7 @@ __archive_string_utf8_w(struct archive_string *as)
} else } else
*dest++ = wc; *dest++ = wc;
} }
*dest++ = L'\0'; *dest = L'\0';
return (ws); return (ws);
} }