Skip to content

Commit

Permalink
test: no need to rewind freshly allocated mbuf (#876)
Browse files Browse the repository at this point in the history
* test: no need to rewind freshly allocated mbuf

* test: move buf check to after mbuf_alloc
  • Loading branch information
alfredh authored Jul 12, 2023
1 parent 7a8a3a9 commit ace6681
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions test/rtp.c
Original file line number Diff line number Diff line change
Expand Up @@ -636,14 +636,12 @@ int test_rtcp_twcc(void)
};

struct mbuf *buf = mbuf_alloc(sizeof(packets));
if (!buf)
return ENOMEM;

struct rtcp_msg *msg = NULL;
int err = 0;

if (!buf)
return ENOMEM;

mbuf_rewind(buf);
mbuf_write_mem(buf, packets, sizeof(packets));
mbuf_set_pos(buf, 0);

Expand Down

0 comments on commit ace6681

Please sign in to comment.