]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
streaming/sbb: convert RB_MIN to 'head'
authorVictor Julien <victor@inliniac.net>
Wed, 29 Aug 2018 13:31:39 +0000 (15:31 +0200)
committerVictor Julien <victor@inliniac.net>
Mon, 17 Sep 2018 06:27:24 +0000 (08:27 +0200)
src/stream-tcp-reassemble.c

index 08a0e25961db4f823c0c54cdf4e3bcff77e110df..0a2d7b83e15609d0a6d947f7173d9f8f4141780c 100644 (file)
@@ -896,7 +896,7 @@ static void GetAppBuffer(TcpStream *stream, const uint8_t **data, uint32_t *data
         *data = mydata;
         *data_len = mydata_len;
     } else {
-        StreamingBufferBlock *blk = RB_MIN(SBB, &stream->sb.sbb_tree);
+        StreamingBufferBlock *blk = stream->sb.head;
 
         if (blk->offset > offset) {
             SCLogDebug("gap, want data at offset %"PRIu64", "
@@ -964,7 +964,7 @@ static inline bool CheckGap(TcpSession *ssn, TcpStream *stream, Packet *p)
                     return false;
                 } else {
                     const uint64_t next_seq_abs = STREAM_BASE_OFFSET(stream) + (stream->next_seq - stream->base_seq);
-                    StreamingBufferBlock *blk = RB_MIN(SBB, &stream->sb.sbb_tree);
+                    const StreamingBufferBlock *blk = stream->sb.head;
                     if (blk->offset > next_seq_abs && blk->offset < last_ack_abs) {
                         /* ack'd data after the gap */
                         SCLogDebug("packet %"PRIu64": GAP. "