aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/wtap.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2011-04-21 17:51:19 +0000
committerGuy Harris <guy@alum.mit.edu>2011-04-21 17:51:19 +0000
commit140cc563c6731e0b4fac5d393d4a244892520ac4 (patch)
tree05b292cfc68c23c1a210555881384ed536d63c70 /wiretap/wtap.c
parent7f47f89b1e35f9d3481e6781e050fbb964a002fc (diff)
In file_wrappers.c, explicitly set err_info to null for all errors that
don't have an "additional information" string. Get rid of WTAP_ERR_ZLIB; just report an internal error with WTAP_ERR_INTERNAL instead. (If they start happening, we can think about supplying an "additional information" string for compression errors on output.) svn path=/trunk/; revision=36774
Diffstat (limited to 'wiretap/wtap.c')
-rw-r--r--wiretap/wtap.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/wiretap/wtap.c b/wiretap/wtap.c
index 6b76e6eed3..1ff72ba86d 100644
--- a/wiretap/wtap.c
+++ b/wiretap/wtap.c
@@ -588,7 +588,8 @@ static const char *wtap_errlist[] = {
"The standard input cannot be opened for random access",
"That file format doesn't support compression",
NULL,
- "Uncompression error"
+ "Uncompression error",
+ "Internal error"
};
#define WTAP_ERRLIST_SIZE (sizeof wtap_errlist / sizeof wtap_errlist[0])
@@ -599,14 +600,6 @@ const char
unsigned int wtap_errlist_index;
if (err < 0) {
-#ifdef HAVE_LIBZ
- if (err >= WTAP_ERR_ZLIB_MIN && err <= WTAP_ERR_ZLIB_MAX) {
- /* Assume it's a zlib error. */
- g_snprintf(errbuf, 128, "Uncompression error: %s",
- zError(err - WTAP_ERR_ZLIB));
- return errbuf;
- }
-#endif
wtap_errlist_index = -1 - err;
if (wtap_errlist_index >= WTAP_ERRLIST_SIZE) {
g_snprintf(errbuf, 128, "Error %d", err);