[asterisk-commits] russell: branch russell/data_retrieval r112563 - /team/russell/data_retrieval...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Apr 3 00:48:50 CDT 2008
Author: russell
Date: Thu Apr 3 00:48:49 2008
New Revision: 112563
URL: http://svn.digium.com/view/asterisk?view=rev&rev=112563
Log:
add a bunch of curly braces to comply with the coding guidelines change ...
it'll take me a while to make this a habit :)
Modified:
team/russell/data_retrieval/main/data.c
Modified: team/russell/data_retrieval/main/data.c
URL: http://svn.digium.com/view/asterisk/team/russell/data_retrieval/main/data.c?view=diff&rev=112563&r1=112562&r2=112563
==============================================================================
--- team/russell/data_retrieval/main/data.c (original)
+++ team/russell/data_retrieval/main/data.c Thu Apr 3 00:48:49 2008
@@ -111,8 +111,9 @@
len += strlen(friendly_name) + 1;
}
- if (!(node = ast_calloc(1, len)))
- return NULL;
+ if (!(node = ast_calloc(1, len))) {
+ return NULL;
+ }
strcpy(node->name, name);
@@ -128,8 +129,9 @@
{
struct ast_data_node *child_node;
- if (!node)
- return NULL;
+ if (!node) {
+ return NULL;
+ }
while ((child_node = AST_LIST_REMOVE_HEAD(&node->children, entry))) {
ast_data_node_destroy(child_node);
@@ -165,8 +167,9 @@
int ast_data_node_set_payload_str(struct ast_data_node *node, const char *str)
{
- if (!(node->payload.str = ast_strdup(str)))
- return -1;
+ if (!(node->payload.str = ast_strdup(str))) {
+ return -1;
+ }
node->node_type = AST_DATA_NODE_STR;
@@ -175,8 +178,9 @@
int ast_data_node_add_child(struct ast_data_node *parent, struct ast_data_node *child)
{
- if (!parent || !child)
- return -1;
+ if (!parent || !child) {
+ return -1;
+ }
AST_LIST_INSERT_TAIL(&parent->children, child, entry);
@@ -305,8 +309,9 @@
return -1;
}
- if (!(holder = ao2_alloc(sizeof(*holder), NULL)))
- return -1;
+ if (!(holder = ao2_alloc(sizeof(*holder), NULL))) {
+ return -1;
+ }
holder->data_prov = data_prov;
@@ -324,8 +329,9 @@
};
struct ast_data_prov_holder *holder;
- if (!(holder = ao2_find(data_providers, &tmp_holder, OBJ_POINTER | OBJ_UNLINK)))
- return -1;
+ if (!(holder = ao2_find(data_providers, &tmp_holder, OBJ_POINTER | OBJ_UNLINK))) {
+ return -1;
+ }
ast_verb(2, "Unregistered Data Provider '%s'\n", holder->data_prov->name);
@@ -431,8 +437,9 @@
return;
}
- if (!node)
+ if (!node) {
return;
+ }
ast_str_set(buf, 0, "=== ");
@@ -608,8 +615,9 @@
int ast_data_init(void)
{
- if (!(data_providers = ao2_container_alloc(NUM_DATA_PROV_BUCKETS, data_prov_hash, data_prov_cmp)))
- return -1;
+ if (!(data_providers = ao2_container_alloc(NUM_DATA_PROV_BUCKETS, data_prov_hash, data_prov_cmp))) {
+ return -1;
+ }
ast_data_provider_register_multiple(data_provs, ARRAY_LEN(data_provs));
More information about the asterisk-commits
mailing list