Move buffer declaration outside the loop
This commit is contained in:
parent
cb148c7139
commit
01901ec451
1 changed files with 1 additions and 2 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue