LWN.net Logo

strncpy() history

strncpy() history

Posted Jul 19, 2012 14:04 UTC (Thu) by danscox (subscriber, #4125)
In reply to: strncpy() history by akanaber
Parent article: The ups and downs of strlcpy()

The original reason for strncpy() was when directory names were limited to 14 chars. The other two bytes contained the inode number. For that particular case, strncpy() worked quite well. Yes, I've been at this for 'way too long now ;-).


(Log in to post comments)

strncpy() history

Posted Jul 19, 2012 19:21 UTC (Thu) by smoogen (subscriber, #97) [Link]

Dear lord.. that sentence led back to flashbacks from the 80's. Thanks.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds