stream: minor constification

pull/8387/head
Victor Julien 4 years ago
parent 989e5c7ba2
commit 1a35801f96

@ -998,7 +998,7 @@ static void GetSessionSize(TcpSession *ssn, Packet *p)
} }
#endif #endif
static StreamingBufferBlock *GetBlock(StreamingBuffer *sb, const uint64_t offset) static StreamingBufferBlock *GetBlock(const StreamingBuffer *sb, const uint64_t offset)
{ {
StreamingBufferBlock *blk = sb->head; StreamingBufferBlock *blk = sb->head;
if (blk == NULL) if (blk == NULL)
@ -1014,7 +1014,7 @@ static StreamingBufferBlock *GetBlock(StreamingBuffer *sb, const uint64_t offset
return NULL; 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); StreamingBufferBlock *nblk = SBB_RB_NEXT(cur_blk);
if (nblk && (cur_blk->offset + cur_blk->len < nblk->offset) && 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 * \param check_for_gap check if there is a gap ahead. Optional as it is only
* needed for app-layer incomplete support. * needed for app-layer incomplete support.
* \retval bool pkt loss ahead */ * \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) uint64_t offset, const bool check_for_gap)
{ {
const uint8_t *mydata; const uint8_t *mydata;

Loading…
Cancel
Save