frames: suppress cppcheck warning

src/app-layer-frames.c:471:5: warning: Identical condition 'stream_slice->input==NULL', second condition is always false [identicalConditionAfterEarlyExit]
    BUG_ON(stream_slice->input == NULL);
    ^
src/app-layer-frames.c:468:29: note: If condition 'stream_slice->input==NULL' is true, the function will return/exit
    if (stream_slice->input == NULL)
                            ^
src/app-layer-frames.c:471:5: note: Testing identical condition 'stream_slice->input==NULL'
    BUG_ON(stream_slice->input == NULL);
    ^
src/app-layer-frames.c:548:5: warning: Identical condition 'stream_slice->input==NULL', second condition is always false [identicalConditionAfterEarlyExit]
    BUG_ON(stream_slice->input == NULL);
    ^
src/app-layer-frames.c:545:29: note: If condition 'stream_slice->input==NULL' is true, the function will return/exit
    if (stream_slice->input == NULL)
                            ^
src/app-layer-frames.c:548:5: note: Testing identical condition 'stream_slice->input==NULL'
    BUG_ON(stream_slice->input == NULL);
    ^
pull/8288/head
Victor Julien 3 years ago
parent 16c19bd2f6
commit 17cd41c887

@ -467,8 +467,9 @@ Frame *AppLayerFrameNewByRelativeOffset(Flow *f, const StreamSlice *stream_slice
return NULL;
if (stream_slice->input == NULL)
return NULL;
#endif
#else
BUG_ON(stream_slice->input == NULL);
#endif
BUG_ON(f->proto == IPPROTO_TCP && f->protoctx == NULL);
BUG_ON(f->alparser == NULL);
@ -544,8 +545,9 @@ Frame *AppLayerFrameNewByAbsoluteOffset(Flow *f, const StreamSlice *stream_slice
return NULL;
if (stream_slice->input == NULL)
return NULL;
#endif
#else
BUG_ON(stream_slice->input == NULL);
#endif
BUG_ON(f->proto == IPPROTO_TCP && f->protoctx == NULL);
BUG_ON(f->alparser == NULL);
BUG_ON(frame_start < stream_slice->offset);

Loading…
Cancel
Save