[asterisk-commits] eliel: branch group/appdocsxml r151017 - /team/group/appdocsxml/main/pbx.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sat Oct 18 11:58:34 CDT 2008
Author: eliel
Date: Sat Oct 18 11:58:33 2008
New Revision: 151017
URL: http://svn.digium.com/view/asterisk?view=rev&rev=151017
Log:
It is not needed to check twice that node && node->AST_XML_CHILD exists
Modified:
team/group/appdocsxml/main/pbx.c
Modified: team/group/appdocsxml/main/pbx.c
URL: http://svn.digium.com/view/asterisk/team/group/appdocsxml/main/pbx.c?view=diff&rev=151017&r1=151016&r2=151017
==============================================================================
--- team/group/appdocsxml/main/pbx.c (original)
+++ team/group/appdocsxml/main/pbx.c Sat Oct 18 11:58:33 2008
@@ -3804,7 +3804,7 @@
char *syntax = NULL;
node = xmldoc_get_node(type, name, documentation_language);
- if (!node || !node->AST_XML_CHILD) {
+ if (!node) {
return NULL;
}
@@ -3990,10 +3990,6 @@
struct ast_str *cleanstr = NULL;
int ret = 0, printedpara=0;
- if (!node || !node->AST_XML_CHILD) {
- return ret;
- }
-
tmp = node->AST_XML_CHILD;
while (tmp) {
if (xmldoc_parse_para(tmp, (ret ? tabs : ""), "\n", buffer)) {
@@ -4189,10 +4185,6 @@
ast_xml_node *node = fixnode;
int ret = 0;
- if (!node || !node->AST_XML_CHILD) {
- return ret;
- }
-
node = node->AST_XML_CHILD;
while (node) {
if ((xmldoc_parse_para(node, (ret ? tabs : " - "), "\n", buffer))) {
@@ -4217,10 +4209,6 @@
ast_xml_node *node = fixnode;
ast_xml_attr *enumname;
int ret = 0;
-
- if (!node || !node->AST_XML_CHILD) {
- return ret;
- }
node = node->AST_XML_CHILD;
while (node) {
@@ -4261,10 +4249,6 @@
int ret = 0;
char *optiontabs;
- if (!node || !node->AST_XML_CHILD) {
- return ret;
- }
-
ast_asprintf(&optiontabs, "%s ", tabs);
node = node->AST_XML_CHILD;
@@ -4312,10 +4296,6 @@
ast_xml_attr *optname;
char *optionsyntax;
- if (!node || !node->AST_XML_CHILD) {
- return;
- }
-
node = node->AST_XML_CHILD;
while (node) {
/* Start appending every option tag. */
@@ -4361,7 +4341,7 @@
int hasarguments, printed = 0;
char *internaltabs;
- if (!node || !node->AST_XML_CHILD || strcasecmp((char *)node->AST_XML_NAME, "parameter")) {
+ if (strcasecmp((char *)node->AST_XML_NAME, "parameter")) {
return;
}
@@ -4476,10 +4456,6 @@
ast_xml_node *tmp;
struct ast_str *ret = ast_str_create(1);
char *notcleanret, *tmpstr;
-
- if (!node || !node->AST_XML_CHILD) {
- return NULL;
- }
if (raw_output) {
notcleanret = ast_xml_get_text(node);
More information about the asterisk-commits
mailing list