[Asterisk-Dev] Questions Regarding the ast_copy_string() Janitor Project

Kevin P. Fleming kpfleming at digium.com
Tue Jan 10 11:19:58 MST 2006


Luigi Rizzo wrote:

> it's probably a leftover from previous code when strncpy was used.
> Probably safe to remove it.

Agreed.

> i'd say yes. in this case the memset is a quick way to make sure
> the struct is consistently initialized. Many of them should
> disappear by replacing malloc() + memset() with calloc() calls.

Correct on both points.



More information about the asterisk-dev mailing list