mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2025-08-17 17:05:50 +00:00
Move buffer declaration outside the loop
This commit is contained in:
parent
cb148c7139
commit
01901ec451
@ -71,10 +71,9 @@ static void UdpPingThreadProc(void *context) {
|
||||
static void ReceiveThreadProc(void* context) {
|
||||
int err;
|
||||
PRTP_PACKET rtp;
|
||||
char* buffer = NULL;
|
||||
|
||||
while (!PltIsThreadInterrupted(&receiveThread)) {
|
||||
char* buffer = NULL;
|
||||
|
||||
if (buffer == NULL) {
|
||||
buffer = (char*) malloc(MAX_PACKET_SIZE + sizeof(int));
|
||||
if (buffer == NULL) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user