Revert r50668, remove fd check to fix CID 1050093
authordarkjames <darkjames@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 17 Jul 2013 17:10:52 +0000 (17:10 +0000)
committerdarkjames <darkjames@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 17 Jul 2013 17:10:52 +0000 (17:10 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@50698 f5534014-38df-0310-8fa8-9805f1628bb7

frame_tvbuff.c

index 0a3652a17ad604c42827431f7f104f27624975ce..27db55765e5a8a9712022f89983dc859a0f902ce 100644 (file)
@@ -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;