That will cause a compiler error because the function is looking for a pointer to a unit8_t but &buf is a pointer to a char array of size 100. Note, even the first code may cause errors when compiled for certain platforms (like ESP32) as they may have options set to prohibit implicit conversion from char * to uint8_t *