summaryrefslogtreecommitdiff
path: root/libarchive/archive_util.c
diff options
context:
space:
mode:
authorTim Kientzle <kientzle@gmail.com>2009-01-22 00:58:23 -0500
committerTim Kientzle <kientzle@gmail.com>2009-01-22 00:58:23 -0500
commit46e192380dca89d865c24f5ea10b929265ae1abf (patch)
tree1f3e9377a7fdbf11863b921b3278bd278a48ac85 /libarchive/archive_util.c
parenta265d9ba8c27cc8f1bb6cb2e1f29f8933ef188bc (diff)
downloadlibarchive-46e192380dca89d865c24f5ea10b929265ae1abf.tar.gz
Don't append the strerror() information here; we're returning
the errno anyway, so the client can do that if they want. In particular, this fixes a lot of duplicated errno information. SVN-Revision: 457
Diffstat (limited to 'libarchive/archive_util.c')
-rw-r--r--libarchive/archive_util.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/libarchive/archive_util.c b/libarchive/archive_util.c
index 55650855..ef3381d8 100644
--- a/libarchive/archive_util.c
+++ b/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;
}