aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/aethra.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-10-07 16:18:47 -0700
committerGuy Harris <guy@alum.mit.edu>2014-10-07 23:19:56 +0000
commita566f617d8f712a8f4d1fe7b6d9b9f6ebe79ba11 (patch)
tree1730a9b5c9cc7704273e4104a426e6987f9ef9b6 /wiretap/aethra.c
parent5e0e4fa9e4de39f9402e6472e6b25439f8464c24 (diff)
No need for WTAP_ERR_CANT_READ.
Unlike the standard I/O routines, the code we introduced that supports fast random seeking on gzipped files will always supply some specific error code for read errors, so we don't need WTAP_ERR_CANT_READ. Add WTAP_ERR_CANT_WRITE for writing, as we're still using the standard I/O routines for that. Set errno to WTAP_ERR_CANT_WRITE before calling fwrite() in wtap_dump_file_write(), so that it's used if fwrite() fails without setting errno. Change-Id: I6bf066a6838284a532737aa65fd0c9bb3639ad63 Reviewed-on: https://code.wireshark.org/review/4540 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'wiretap/aethra.c')
-rw-r--r--wiretap/aethra.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/wiretap/aethra.c b/wiretap/aethra.c
index 87e5515037..331c6fcfdd 100644
--- a/wiretap/aethra.c
+++ b/wiretap/aethra.c
@@ -126,7 +126,6 @@ int aethra_open(wtap *wth, int *err, gchar **err_info)
aethra_t *aethra;
/* Read in the string that should be at the start of a "aethra" file */
- errno = WTAP_ERR_CANT_READ;
if (!wtap_read_bytes(wth->fh, hdr.magic, sizeof hdr.magic, err,
err_info)) {
if (*err != WTAP_ERR_SHORT_READ)
@@ -138,7 +137,6 @@ int aethra_open(wtap *wth, int *err, gchar **err_info)
return 0;
/* Read the rest of the header. */
- errno = WTAP_ERR_CANT_READ;
if (!wtap_read_bytes(wth->fh, (char *)&hdr + sizeof hdr.magic,
sizeof hdr - sizeof hdr.magic, err, err_info))
return -1;
@@ -301,7 +299,6 @@ aethra_read_rec_header(wtap *wth, FILE_T fh, struct aethrarec_hdr *hdr,
guint32 msecs;
/* Read record header. */
- errno = WTAP_ERR_CANT_READ;
if (!wtap_read_bytes_or_eof(fh, hdr, sizeof *hdr, err, err_info))
return FALSE;