|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
|
Re: [PLUG] unix cp function call
|
| If you're really copying text strings, then use strcpy(3) to get a
| \0-filled tail in the destination.
*never* use 'strcpy'(3)[1].
use 'strncpy'(3).
even in toy throw-away programs, it is cheap, safe,
and good programming practice.
--jeff
[1] or any of the non-'n' versions of the str* functions.
______________________________________________________________________
Philadelphia Linux Users Group - http://www.phillylinux.org
Announcements-http://lists.phillylinux.org/mail/listinfo/plug-announce
General Discussion - http://lists.phillylinux.org/mail/listinfo/plug
|
|