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/wtap-int.h | |
parent | c039f9f8a8bb04d2a8dcd6e2ec1facaee3f1f855 (diff) |
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/wtap-int.h')
-rw-r--r-- | wiretap/wtap-int.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/wiretap/wtap-int.h b/wiretap/wtap-int.h index 87ddf4a2fb..ac206b06eb 100644 --- a/wiretap/wtap-int.h +++ b/wiretap/wtap-int.h @@ -304,7 +304,7 @@ extern gint wtap_num_file_types; G_STMT_START \ { \ int _bytes_read; \ - _bytes_read = file_read((target), 1, (num_bytes), (fh)); \ + _bytes_read = file_read((target), (num_bytes), (fh)); \ if (_bytes_read != (int) (num_bytes)) { \ *(err) = file_error((fh)); \ return FALSE; \ @@ -316,7 +316,7 @@ extern gint wtap_num_file_types; G_STMT_START \ { \ int _bytes_read; \ - _bytes_read = file_read((target), 1, (num_bytes), (fh)); \ + _bytes_read = file_read((target), (num_bytes), (fh)); \ if (_bytes_read != (int) (num_bytes)) { \ *(err) = file_error((fh)); \ if (*(err) == 0 && _bytes_read > 0) { \ |