[Asterisk-Dev] [RFC] strncpy -> ast_copy_string
Tilghman Lesher
tilghman at mail.jeffandtilghman.com
Tue May 3 14:11:02 MST 2005
On Tuesday 03 May 2005 14:55, Kevin P. Fleming wrote:
> 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().
Well, chan_sip is now broken in CVS due to this change. I did a
:%s/ast_copy_string/strncpy/g
in vim, recompiled, and chan_sip works again.
--
Tilghman
More information about the asterisk-dev
mailing list