From 30d5ffbe79c4cec2ab5b72d51bd7c9f8962c2bb2 Mon Sep 17 00:00:00 2001 From: Jakub Zawadzki Date: Wed, 17 Jul 2013 17:10:52 +0000 Subject: Revert r50668, remove fd check to fix CID 1050093 svn path=/trunk/; revision=50698 --- frame_tvbuff.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'frame_tvbuff.c') diff --git a/frame_tvbuff.c b/frame_tvbuff.c index 0a3652a17a..27db55765e 100644 --- a/frame_tvbuff.c +++ b/frame_tvbuff.c @@ -201,14 +201,8 @@ frame_tvbuff_new(const frame_data *fd, const guint8 *buf) */ tvb->real_data = buf; - if (fd) { - tvb->length = fd->cap_len; - tvb->reported_length = fd->pkt_len > G_MAXINT ? G_MAXINT : fd->pkt_len; - } else { - tvb->length = 0; - tvb->reported_length = 0; - } - + tvb->length = fd->cap_len; + tvb->reported_length = fd->pkt_len > G_MAXINT ? G_MAXINT : fd->pkt_len; tvb->initialized = TRUE; /* @@ -223,7 +217,7 @@ frame_tvbuff_new(const frame_data *fd, const guint8 *buf) /* don't care, reassemble code was doing whole copy of data, so it'll work the same */ /* XXX, wtap_can_seek() */ - if (fd && cfile.wth && cfile.wth->random_fh) { + if (cfile.wth && cfile.wth->random_fh) { frame_tvb->wth = cfile.wth; frame_tvb->file_off = fd->file_off; frame_tvb->offset = 0; -- cgit v1.2.3