Skip to content

Commit

Permalink
fix(build): avoid pointer signedness mismatch
Browse files Browse the repository at this point in the history
Technically, the proper type is signed, since -1 is a sentinel value
but since the API specifies an unsigned type, just cast the pointer
here.

Signed-off-by: Grzegorz Nosek <[email protected]>
  • Loading branch information
gnosek authored and poiana committed Jun 5, 2023
1 parent b0eac69 commit bcfc5db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion userspace/libscap/engine/modern_bpf/scap_modern_bpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ static void scap_modern_bpf__free_engine(struct scap_engine_handle engine)
*/
static int32_t scap_modern_bpf__next(struct scap_engine_handle engine, OUT scap_evt** pevent, OUT uint16_t* buffer_id)
{
pman_consume_first_event((void**)pevent, buffer_id);
pman_consume_first_event((void**)pevent, (int16_t*)buffer_id);

if((*pevent) == NULL)
{
Expand Down

0 comments on commit bcfc5db

Please sign in to comment.