aboutsummaryrefslogtreecommitdiffstats
path: root/reordercap.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2019-04-06 14:02:49 -0700
committerGuy Harris <guy@alum.mit.edu>2019-04-06 21:04:02 +0000
commit937ec02581ee3918e6caa6de75340c28593a22d5 (patch)
tree7b248de19e92997267b3b6292d216423b4e4f4eb /reordercap.c
parentf0a2b8303a9fcd18d09e27d79bd21ac19d9da7d0 (diff)
1514 is a better initial Buffer size than 1500.
Ethernet packets without the CRC are 1514 bytes long, not 1500 bytes long; using 1514 bytes will avoid a reallocation for a full-sized Ethernet packet. Change-Id: Ie8da3f13bf3df07e23e4478b7dcf84f06dec6a9d Reviewed-on: https://code.wireshark.org/review/32761 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'reordercap.c')
-rw-r--r--reordercap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/reordercap.c b/reordercap.c
index c72e082a2c..0ea583cec6 100644
--- a/reordercap.c
+++ b/reordercap.c
@@ -284,7 +284,7 @@ main(int argc, char *argv[])
/* Read each frame from infile */
wtap_rec_init(&rec);
- ws_buffer_init(&buf, 1500);
+ ws_buffer_init(&buf, 1514);
while (wtap_read(wth, &rec, &buf, &err, &err_info, &data_offset)) {
FrameRecord_t *newFrameRecord;
@@ -320,7 +320,7 @@ main(int argc, char *argv[])
/* Write out each sorted frame in turn */
wtap_rec_init(&rec);
- ws_buffer_init(&buf, 1500);
+ ws_buffer_init(&buf, 1514);
for (i = 0; i < frames->len; i++) {
FrameRecord_t *frame = (FrameRecord_t *)frames->pdata[i];