User: Password:
|
|
Subscribe / Log in / New account

The ups and downs of strlcpy()

The ups and downs of strlcpy()

Posted Aug 24, 2013 23:57 UTC (Sat) by tjc (guest, #137)
In reply to: The ups and downs of strlcpy() by smurf
Parent article: The ups and downs of strlcpy()

> #define strlcpy(d,n,s) snprintf((d),(n),"%s",(s))

I just tried this (better late than never!), and parameters 2 and 3 are reversed. Fore the sake of posterity, it should be:

#define strlcpy(d,s,n) snprintf((d),(n),"%s",(s))


(Log in to post comments)


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