summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorkientzle <kientzle@FreeBSD.org>2009-03-06 05:13:12 +0000
committerkientzle <kientzle@FreeBSD.org>2009-03-06 05:13:12 +0000
commite9d024072e3473c8cad012b0657f9214a09fb460 (patch)
tree92e87a6858556d01332a95779ef5eec3cb0b432c /lib
parent447bbc160830e14c9ffb39565e674a9059c7c974 (diff)
downloadFreeBSD-src-e9d024072e3473c8cad012b0657f9214a09fb460.zip
FreeBSD-src-e9d024072e3473c8cad012b0657f9214a09fb460.tar.gz
Merge r457 from libarchive.googlecode.com: Stop appending strerror()
information to error strings. This caused a lot of unnecessary duplication in error messages; in particular, there are a few cases where error messages get copied from one archive object to another and this would cause the strerror() info to get appended each time.
Diffstat (limited to 'lib')
-rw-r--r--lib/libarchive/archive_util.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/lib/libarchive/archive_util.c b/lib/libarchive/archive_util.c
index 767987e..bc39a4d 100644
--- a/lib/libarchive/archive_util.c
+++ b/lib/libarchive/archive_util.c
@@ -155,10 +155,6 @@ void
archive_set_error(struct archive *a, int error_number, const char *fmt, ...)
{
va_list ap;
-#ifdef HAVE_STRERROR_R
- char errbuff[512];
-#endif
- char *errp;
a->archive_error_number = error_number;
if (fmt == NULL) {
@@ -169,21 +165,6 @@ archive_set_error(struct archive *a, int error_number, const char *fmt, ...)
va_start(ap, fmt);
archive_string_vsprintf(&(a->error_string), fmt, ap);
va_end(ap);
- if (error_number > 0) {
- archive_strcat(&(a->error_string), ": ");
-#ifdef HAVE_STRERROR_R
-#ifdef STRERROR_R_CHAR_P
- errp = strerror_r(error_number, errbuff, sizeof(errbuff));
-#else
- strerror_r(error_number, errbuff, sizeof(errbuff));
- errp = errbuff;
-#endif
-#else
- /* Note: this is not threadsafe! */
- errp = strerror(error_number);
-#endif
- archive_strcat(&(a->error_string), errp);
- }
a->error = a->error_string.s;
}
OpenPOWER on IntegriCloud