[Asterisk-code-review] func callerid: Initialize app argument structures. (asterisk[15])

Jenkins2 asteriskteam at digium.com
Tue Dec 19 11:45:23 CST 2017


Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/7651 )

Change subject: func_callerid: Initialize app argument structures.
......................................................................

func_callerid: Initialize app argument structures.

This module uses AST_DEFINE_APP_ARGS_TYPE to define struct's instead of
directly using AST_DECLARE_APP_ARGS.  Initialize the variables declared
in this way.

Change-Id: If97fbdd8d63a204e2efd498a192effc14e90fb31
---
M funcs/func_callerid.c
1 file changed, 9 insertions(+), 9 deletions(-)

Approvals:
  George Joseph: Looks good to me, but someone else must approve
  Richard Mudgett: Looks good to me, approved
  Jenkins2: Approved for Submit



diff --git a/funcs/func_callerid.c b/funcs/func_callerid.c
index 527babb..0b6ab51 100644
--- a/funcs/func_callerid.c
+++ b/funcs/func_callerid.c
@@ -978,7 +978,7 @@
 static int callerid_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
 {
 	char *parms;
-	struct ast_party_members member;
+	struct ast_party_members member = { 0, };
 	AST_DECLARE_APP_ARGS(args,
 		AST_APP_ARG(member);	/*!< Member name */
 		AST_APP_ARG(cid);		/*!< Optional caller id to parse instead of from the channel. */
@@ -1135,8 +1135,8 @@
 	enum ID_FIELD_STATUS status;
 	char *val;
 	char *parms;
-	struct ast_party_func_args args;
-	struct ast_party_members member;
+	struct ast_party_func_args args = { 0, };
+	struct ast_party_members member = { 0, };
 
 	if (!value || !chan) {
 		return -1;
@@ -1291,7 +1291,7 @@
  */
 static int connectedline_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
 {
-	struct ast_party_members member;
+	struct ast_party_members member = { 0, };
 	char *read_what;
 	enum ID_FIELD_STATUS status;
 
@@ -1359,8 +1359,8 @@
 	char *val;
 	char *parms;
 	void (*set_it)(struct ast_channel *chan, const struct ast_party_connected_line *connected, const struct ast_set_party_connected_line *update);
-	struct ast_party_func_args args;
-	struct ast_party_members member;
+	struct ast_party_func_args args = { 0, };
+	struct ast_party_members member = { 0, };
 	struct ast_flags opts;
 	char *opt_args[CONNECTED_LINE_OPT_ARG_ARRAY_SIZE];
 	enum ID_FIELD_STATUS status;
@@ -1464,7 +1464,7 @@
  */
 static int redirecting_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
 {
-	struct ast_party_members member;
+	struct ast_party_members member = { 0, };
 	char *read_what;
 	const struct ast_party_redirecting *ast_redirecting;
 	enum ID_FIELD_STATUS status;
@@ -1601,8 +1601,8 @@
 	char *val;
 	char *parms;
 	void (*set_it)(struct ast_channel *chan, const struct ast_party_redirecting *redirecting, const struct ast_set_party_redirecting *update);
-	struct ast_party_func_args args;
-	struct ast_party_members member;
+	struct ast_party_func_args args = { 0, };
+	struct ast_party_members member = { 0, };
 	struct ast_flags opts;
 	char *opt_args[REDIRECTING_OPT_ARG_ARRAY_SIZE];
 

-- 
To view, visit https://gerrit.asterisk.org/7651
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: merged
Gerrit-Change-Id: If97fbdd8d63a204e2efd498a192effc14e90fb31
Gerrit-Change-Number: 7651
Gerrit-PatchSet: 1
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171219/5c07f333/attachment.html>


More information about the asterisk-code-review mailing list