wiretap: remove redundant ws_buffer_assure_space

wtap_read_packet_bytes already calls ws_buffer_assure_space.

Change-Id: Ib5c9f7d05ee9f7ba5faa716e941e4c999aa9704f
Reviewed-on: https://code.wireshark.org/review/29916
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
This commit is contained in:
Peter Wu 2018-09-29 13:33:23 +02:00
parent 47eb71d876
commit 62de3e6a44
2 changed files with 0 additions and 4 deletions

View File

@ -52,7 +52,6 @@ static gboolean ber_read_file(wtap *wth, FILE_T fh, wtap_rec *rec,
rec->ts.secs = 0;
rec->ts.nsecs = 0;
ws_buffer_assure_space(buf, packet_size);
return wtap_read_packet_bytes(fh, buf, packet_size, err, err_info);
}

View File

@ -551,9 +551,6 @@ read_packet_data(FILE_T fh, int offset_to_frame, int current_offset_from_packet_
bytes_consumed += seek_increment;
}
/* set-up the packet buffer */
ws_buffer_assure_space(buf, length);
/* read in the packet data */
if (!wtap_read_packet_bytes(fh, buf, length, err, err_info))
return FALSE;