Skip to content

Commit

Permalink
Fix compiler warning
Browse files Browse the repository at this point in the history
'port_number' may be used uninitialized in this function.

This is actually false positive, but let's make the compiler happy.

Fixes #771.
  • Loading branch information
orgads committed Jan 9, 2025
1 parent 03d7c04 commit 3a35cb8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rtpstream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1811,7 +1811,7 @@ static int rtpstream_setsocketoptions(int sock)
/* code checked */
static int rtpstream_get_localport(int* rtpsocket, int* rtcpsocket)
{
int port_number;
int port_number = 0;
int tries;
struct sockaddr_storage address;
int max_tries = (min_rtp_port < (max_rtp_port - 2)) ? (max_rtp_port - min_rtp_port) : 1;
Expand Down

0 comments on commit 3a35cb8

Please sign in to comment.