Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Watch out: what strncpy does is usually not what you'd want it to do.


That's what strlcpy() is for.


Or strncpy, if you'd like to stay within the standard and your strings are small.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: