svn commit: r201095 - head/lib/libarchive

Tim Kientzle kientzle at FreeBSD.org
Mon Dec 28 02:33:22 UTC 2009


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


More information about the svn-src-head mailing list