Code: for (unsigned b = 0; b < afi->ip_size; b++) { bytes.byte[b] = result->data[0][b]; } Could this loop not be replaced by a memcpy? memcpy(bytes.byte, result->data[0], afi->ip_size); Is there some reason that this is a bad idea?