[asterisk-bugs] [JIRA] (ASTERISK-23546) CB_ADD_LEN does not do what you'd think
Richard Mudgett (JIRA)
noreply at issues.asterisk.org
Wed Apr 2 19:17:18 CDT 2014
[ https://issues.asterisk.org/jira/browse/ASTERISK-23546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=216997#comment-216997 ]
Richard Mudgett edited comment on ASTERISK-23546 at 4/2/14 7:16 PM:
--------------------------------------------------------------------
The line should read: :)
{noformat}
ast_str_append(cp, 0, "%s", s);
{noformat}
was (Author: rmudgett):
The line should read:
{noformat}
ast_str_append(cp, 0, "%s", s)
{noformat}
> CB_ADD_LEN does not do what you'd think
> ---------------------------------------
>
> Key: ASTERISK-23546
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-23546
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Affects Versions: SVN, 1.8.26.1
> Reporter: Walter Doekes
> Assignee: Walter Doekes
> Severity: Trivial
>
> What's wrong with this code? ;)
> {code}
> static void CB_ADD_LEN(struct ast_str **cb, const char *str, int len)
> {
> char *s = ast_alloca(len + 1);
> ast_copy_string(s, str, len);
> ast_str_append(cb, 0, "%s", str);
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list