]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
stream: minor constification
authorVictor Julien <vjulien@oisf.net>
Tue, 13 Dec 2022 11:21:17 +0000 (12:21 +0100)
committerVictor Julien <vjulien@oisf.net>
Tue, 17 Jan 2023 10:25:44 +0000 (11:25 +0100)
src/stream-tcp-reassemble.c

index 742657cfc58c93bb173c5cc815bdba0c59a34015..f412228130f738df048be4399dcc7ee02b709af1 100644 (file)
@@ -998,7 +998,7 @@ static void GetSessionSize(TcpSession *ssn, Packet *p)
 }
 #endif
 
-static StreamingBufferBlock *GetBlock(StreamingBuffer *sb, const uint64_t offset)
+static StreamingBufferBlock *GetBlock(const StreamingBuffer *sb, const uint64_t offset)
 {
     StreamingBufferBlock *blk = sb->head;
     if (blk == NULL)
@@ -1014,7 +1014,7 @@ static StreamingBufferBlock *GetBlock(StreamingBuffer *sb, const uint64_t offset
     return NULL;
 }
 
-static inline bool GapAhead(TcpStream *stream, StreamingBufferBlock *cur_blk)
+static inline bool GapAhead(const TcpStream *stream, StreamingBufferBlock *cur_blk)
 {
     StreamingBufferBlock *nblk = SBB_RB_NEXT(cur_blk);
     if (nblk && (cur_blk->offset + cur_blk->len < nblk->offset) &&
@@ -1033,7 +1033,7 @@ static inline bool GapAhead(TcpStream *stream, StreamingBufferBlock *cur_blk)
  *  \param check_for_gap check if there is a gap ahead. Optional as it is only
  *                       needed for app-layer incomplete support.
  *  \retval bool pkt loss ahead */
-static bool GetAppBuffer(TcpStream *stream, const uint8_t **data, uint32_t *data_len,
+static bool GetAppBuffer(const TcpStream *stream, const uint8_t **data, uint32_t *data_len,
         uint64_t offset, const bool check_for_gap)
 {
     const uint8_t *mydata;