Date: Mon, 28 Dec 2009 02:33:22 +0000 (UTC) From: Tim Kientzle <kientzle@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r201095 - head/lib/libarchive Message-ID: <200912280233.nBS2XM4k076094@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kientzle Date: Mon Dec 28 02:33:22 2009 New Revision: 201095 URL: http://svn.freebsd.org/changeset/base/201095 Log: Remove an unused variable and an unnecessary increment. Modified: head/lib/libarchive/archive_string.c Modified: head/lib/libarchive/archive_string.c ============================================================================== --- head/lib/libarchive/archive_string.c Mon Dec 28 02:29:21 2009 (r201094) +++ head/lib/libarchive/archive_string.c Mon Dec 28 02:33:22 2009 (r201095) @@ -291,12 +291,10 @@ __archive_string_utf8_w(struct archive_s 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_s } else *dest++ = wc; } - *dest++ = L'\0'; + *dest = L'\0'; return (ws); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200912280233.nBS2XM4k076094>