I am searching for a faster method of accomplishing this:
int is_empty(char * buf, int size) { int i; for(i = 0; i < size; i++) { if(buf[
int is_empty(char * buf, int size) { return buf[0] == '\0'; }
If your buffer is not a character string, I think that's the fastest way to check...
memcmp() would require you to create a buffer the same size and then use memset to set it all as 0. I doubt that would be faster...