[Asterisk-code-review] res pjsip: alloca can never fail. (asterisk[13])
Richard Mudgett
asteriskteam at digium.com
Fri Jan 20 12:30:34 CST 2017
Richard Mudgett has uploaded a new change for review. ( https://gerrit.asterisk.org/4733 )
Change subject: res_pjsip: alloca can never fail.
......................................................................
res_pjsip: alloca can never fail.
Change-Id: Ia2a6158e5fdf311bc2a1c0c43417978de504b1f1
---
M res/res_pjsip/pjsip_configuration.c
1 file changed, 1 insertion(+), 3 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/33/4733/1
diff --git a/res/res_pjsip/pjsip_configuration.c b/res/res_pjsip/pjsip_configuration.c
index 84dfa22..8959068 100644
--- a/res/res_pjsip/pjsip_configuration.c
+++ b/res/res_pjsip/pjsip_configuration.c
@@ -1711,9 +1711,7 @@
if (number) {
print_name_len = strlen(id) + strlen(number) + 2;
- if (!(print_name = alloca(print_name_len))) {
- return -1;
- }
+ print_name = ast_alloca(print_name_len);
snprintf(print_name, print_name_len, "%s/%s", id, number);
}
--
To view, visit https://gerrit.asterisk.org/4733
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia2a6158e5fdf311bc2a1c0c43417978de504b1f1
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
More information about the asterisk-code-review
mailing list