[Asterisk-Dev] [RFC] strncpy -> ast_copy_string

Kevin P. Fleming kpfleming at digium.com
Tue May 3 12:55:31 MST 2005


Brian West wrote:
> I also have another question.. why didn't we just override strncpy  and 
> strlen with our own functions to call them how we want.. instead  of 
> comign up with ast_strlen_zero and ast_string_copy?

I didn't do that for strncpy() yet because it was too invasive; I wanted 
to be able to test it out first, Also, the semantics are different, so 
anything using strncpy()'s return value would fail.

Same goes for strlen(): ast_strlen_zero() does not return the string 
length at all, it can't be used as a replacement for strlen().



More information about the asterisk-dev mailing list