3 ms·
>> Then strncpy() will happily 0-fill all of that buffer space Yes. And that feels like a really poor choice of the function name in my opinion. It should have
by dchichkov 14y ago
>> Then strncpy() will happily 0-fill all of that buffer space
Yes. And that feels like a really poor choice of the function name in my opinion. It should have been strcpy_pad_with_zeros() rather than strncpy(). To reflect the fact that it is going to waste precious cache lines and memory writes.