mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 03:50:31 +00:00
Resolve FORWARD_NULL static analysis warnings
This resolves core findings from ASTERISK-19650 numbers 0-2, 6, 7, 9-11, 14-20, 22-24, 28, 30-32, 34-36, 42-56, 82-84, 87, 89-90, 93-102, 104, 105, 109-111, and 115. Finding numbers 26, 33, and 29 were already resolved. Those skipped were either extended/deprecated or in areas of code that shouldn't be disturbed. (Closes issue ASTERISK-19650) ........ Merged revisions 366167 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 366168 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@366169 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1160,7 +1160,11 @@ static pval *get_goto_target(pval *item)
|
||||
pval *curr_ext = get_extension_or_contxt(item); /* containing exten, or macro */
|
||||
pval *curr_cont;
|
||||
|
||||
if (item->u1.list && !item->u1.list->next && !strstr((item->u1.list)->u1.str,"${")) {
|
||||
if (!item->u1.list) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!item->u1.list->next && !strstr((item->u1.list)->u1.str,"${")) {
|
||||
struct pval *x = find_label_in_current_extension((char*)((item->u1.list)->u1.str), curr_ext);
|
||||
return x;
|
||||
}
|
||||
@@ -5882,7 +5886,7 @@ pval* pvalGlobalsWalkStatements( pval *p, pval **next_statement )
|
||||
{
|
||||
if (!pvalCheckType(p, "pvalGlobalsWalkStatements", PV_GLOBALS))
|
||||
return 0;
|
||||
if (!next_statement) {
|
||||
if (!*next_statement) {
|
||||
*next_statement = p;
|
||||
return p;
|
||||
} else {
|
||||
@@ -5903,7 +5907,7 @@ void pvalTopLevAddObject( pval *p, pval *contextOrObj )
|
||||
|
||||
pval *pvalTopLevWalkObjects(pval *p, pval **next_obj )
|
||||
{
|
||||
if (!next_obj) {
|
||||
if (!*next_obj) {
|
||||
*next_obj = p;
|
||||
return p;
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user