diff options
author | Guy Harris <guy@alum.mit.edu> | 2011-04-06 06:51:19 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2011-04-06 06:51:19 +0000 |
commit | 4c93827e34e879111b00873b2cd7c823b6b69f88 (patch) | |
tree | fdb9ea83c685200de45a790065fcc6be6a26fc88 /wiretap/5views.c | |
parent | c039f9f8a8bb04d2a8dcd6e2ec1facaee3f1f855 (diff) | |
download | wireshark-4c93827e34e879111b00873b2cd7c823b6b69f88.tar.gz |
From Jakub Zawadzki:
file_read(buf, bsize, count, file) macro is compilant with fread
function and takes elements count+ size of each element, however to make
it compilant with gzread() it always returns number of bytes.
In wiretap file_read() this is not really used, file_read is called
either with bsize set to 1 or count to 1.
Attached patch remove bsize argument from macro.
svn path=/trunk/; revision=36491
Diffstat (limited to 'wiretap/5views.c')
-rw-r--r-- | wiretap/5views.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/wiretap/5views.c b/wiretap/5views.c index 39c8a56bff..8cfff5e15d 100644 --- a/wiretap/5views.c +++ b/wiretap/5views.c @@ -126,7 +126,7 @@ int _5views_open(wtap *wth, int *err, gchar **err_info) int encap = WTAP_ENCAP_UNKNOWN; errno = WTAP_ERR_CANT_READ; - bytes_read = file_read(&Capture_Header.Info_Header, 1, sizeof(t_5VW_Info_Header), wth->fh); + bytes_read = file_read(&Capture_Header.Info_Header, sizeof(t_5VW_Info_Header), wth->fh); if (bytes_read != sizeof(t_5VW_Info_Header)) { *err = file_error(wth->fh); if (*err != 0) @@ -182,7 +182,7 @@ int _5views_open(wtap *wth, int *err, gchar **err_info) } /* read the remaining header information */ - bytes_read = file_read(&Capture_Header.HeaderDateCreation, 1, sizeof (t_5VW_Capture_Header) - sizeof(t_5VW_Info_Header), wth->fh); + bytes_read = file_read(&Capture_Header.HeaderDateCreation, sizeof (t_5VW_Capture_Header) - sizeof(t_5VW_Info_Header), wth->fh); if (bytes_read != sizeof (t_5VW_Capture_Header)- sizeof(t_5VW_Info_Header) ) { *err = file_error(wth->fh); if (*err != 0) @@ -276,7 +276,7 @@ _5views_read_rec_data(FILE_T fh, guchar *pd, int length, int *err) int bytes_read; errno = WTAP_ERR_CANT_READ; - bytes_read = file_read(pd, 1, length, fh); + bytes_read = file_read(pd, length, fh); if (bytes_read != length) { *err = file_error(fh); @@ -301,7 +301,7 @@ _5views_read_header(wtap *wth _U_, FILE_T fh, t_5VW_TimeStamped_Header *hdr, bytes_to_read = sizeof(t_5VW_TimeStamped_Header); /* Read record header. */ - bytes_read = file_read(hdr, 1, bytes_to_read, fh); + bytes_read = file_read(hdr, bytes_to_read, fh); if (bytes_read != bytes_to_read) { *err = file_error(fh); if (*err == 0 && bytes_read != 0) { |