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))