aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/hcidump.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2011-04-06 06:51:19 +0000
committerGuy Harris <guy@alum.mit.edu>2011-04-06 06:51:19 +0000
commit4c93827e34e879111b00873b2cd7c823b6b69f88 (patch)
treefdb9ea83c685200de45a790065fcc6be6a26fc88 /wiretap/hcidump.c
parentc039f9f8a8bb04d2a8dcd6e2ec1facaee3f1f855 (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/hcidump.c')
-rw-r--r--wiretap/hcidump.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/wiretap/hcidump.c b/wiretap/hcidump.c
index b4ccf08565..feae91057d 100644
--- a/wiretap/hcidump.c
+++ b/wiretap/hcidump.c
@@ -47,7 +47,7 @@ static gboolean hcidump_read(wtap *wth, int *err, gchar **err_info,
*data_offset = wth->data_offset;
- bytes_read = file_read(&dh, 1, DUMP_HDR_SIZE, wth->fh);
+ bytes_read = file_read(&dh, DUMP_HDR_SIZE, wth->fh);
if (bytes_read != DUMP_HDR_SIZE) {
*err = file_error(wth->fh);
if (*err == 0 && bytes_read != 0)
@@ -71,7 +71,7 @@ static gboolean hcidump_read(wtap *wth, int *err, gchar **err_info,
buffer_assure_space(wth->frame_buffer, packet_size);
buf = buffer_start_ptr(wth->frame_buffer);
- bytes_read = file_read(buf, 1, packet_size, wth->fh);
+ bytes_read = file_read(buf, packet_size, wth->fh);
if (bytes_read != packet_size) {
*err = file_error(wth->fh);
if (*err == 0)
@@ -100,7 +100,7 @@ static gboolean hcidump_seek_read(wtap *wth, gint64 seek_off,
if (file_seek(wth->random_fh, seek_off, SEEK_SET, err) == -1)
return FALSE;
- bytes_read = file_read(&dh, 1, DUMP_HDR_SIZE, wth->random_fh);
+ bytes_read = file_read(&dh, DUMP_HDR_SIZE, wth->random_fh);
if (bytes_read != DUMP_HDR_SIZE) {
*err = file_error(wth->random_fh);
if (*err == 0 && bytes_read != 0)
@@ -108,7 +108,7 @@ static gboolean hcidump_seek_read(wtap *wth, gint64 seek_off,
return FALSE;
}
- bytes_read = file_read(pd, 1, length, wth->random_fh);
+ bytes_read = file_read(pd, length, wth->random_fh);
if (bytes_read != length) {
*err = file_error(wth->random_fh);
if (*err == 0)
@@ -127,7 +127,7 @@ int hcidump_open(wtap *wth, int *err, gchar **err_info _U_)
guint8 type;
int bytes_read;
- bytes_read = file_read(&dh, 1, DUMP_HDR_SIZE, wth->fh);
+ bytes_read = file_read(&dh, DUMP_HDR_SIZE, wth->fh);
if (bytes_read != DUMP_HDR_SIZE) {
*err = file_error(wth->fh);
return (*err != 0) ? -1 : 0;
@@ -137,7 +137,7 @@ int hcidump_open(wtap *wth, int *err, gchar **err_info _U_)
|| GUINT16_FROM_LE(dh.len) < 1)
return 0;
- bytes_read = file_read(&type, 1, 1, wth->fh);
+ bytes_read = file_read(&type, 1, wth->fh);
if (bytes_read != 1) {
*err = file_error(wth->fh);
return (*err != 0) ? -1 : 0;