I would probably just use memset rather than the for loop. :)

From: M100 
<[email protected]<mailto:[email protected]>> 
on behalf of Dan Higdon <[email protected]<mailto:[email protected]>>
Reply-To: <[email protected]<mailto:[email protected]>>
Date: Tuesday, October 15, 2019 at 8:10 AM
To: <[email protected]<mailto:[email protected]>>
Subject: Re: [M100] Issue with sd2tpdd

I'd also consider re-writing clear buffer to take a (char *c) parameter, like 
this:

void clearBuffer(char* buffer, int bufferSize){ //Fills the buffer with 0x00
  for(int i=0; i<bufferSize; i++){
    buffer[i] = '\0';
  }
}

Reply via email to