Move buffer declaration outside the loop

This commit is contained in:
Cameron Gutman 2014-08-24 12:19:00 -07:00
parent cb148c7139
commit 01901ec451

View File

@ -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) {