| Linux eliminates the strncpy API after six years of work, 360 patches(phoronix.com) | |
| 239 points by simonpure 15 hours ago | 228 comments | |
tl;dr: After six years and 362 commits, Linux 7.2 has fully removed the strncpy() API from the kernel, which was long deprecated due to bug-prone NUL termination semantics and performance overhead from redundant zero-filling. Developers should now use replacements like strscpy(), strscpy_pad(), strtomem_pad(), memcpy_and_pad(), or plain memcpy() depending on the use case. | |
HN Discussion:
| |