mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2025-08-18 09:25:49 +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) {
|
static void ReceiveThreadProc(void* context) {
|
||||||
int err;
|
int err;
|
||||||
PRTP_PACKET rtp;
|
PRTP_PACKET rtp;
|
||||||
|
char* buffer = NULL;
|
||||||
|
|
||||||
while (!PltIsThreadInterrupted(&receiveThread)) {
|
while (!PltIsThreadInterrupted(&receiveThread)) {
|
||||||
char* buffer = NULL;
|
|
||||||
|
|
||||||
if (buffer == NULL) {
|
if (buffer == NULL) {
|
||||||
buffer = (char*) malloc(MAX_PACKET_SIZE + sizeof(int));
|
buffer = (char*) malloc(MAX_PACKET_SIZE + sizeof(int));
|
||||||
if (buffer == NULL) {
|
if (buffer == NULL) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user