[asterisk-commits] dvossel: trunk r203444 - in /trunk/main: ast_expr2.c ast_expr2.fl
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Jun 25 16:45:36 CDT 2009
Author: dvossel
Date: Thu Jun 25 16:45:32 2009
New Revision: 203444
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=203444
Log:
fixes a few redundant conditions
(issue #15269)
Modified:
trunk/main/ast_expr2.c
trunk/main/ast_expr2.fl
Modified: trunk/main/ast_expr2.c
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/main/ast_expr2.c?view=diff&rev=203444&r1=203443&r2=203444
==============================================================================
--- trunk/main/ast_expr2.c (original)
+++ trunk/main/ast_expr2.c Thu Jun 25 16:45:32 2009
@@ -2415,7 +2415,6 @@
free_value (struct val *vp)
{
if (vp==NULL) {
- free(vp);
return;
}
if (vp->type == AST_EXPR_string || vp->type == AST_EXPR_numeric_string)
Modified: trunk/main/ast_expr2.fl
URL: http://svn.asterisk.org/svn-view/asterisk/trunk/main/ast_expr2.fl?view=diff&rev=203444&r1=203443&r2=203444
==============================================================================
--- trunk/main/ast_expr2.fl (original)
+++ trunk/main/ast_expr2.fl Thu Jun 25 16:45:32 2009
@@ -243,10 +243,10 @@
void ast_yyfree(void *ptr, yyscan_t yyscanner)
{
- if (ptr) /* the normal generated yyfree func just frees its first arg;
- this get complaints on some systems, as sometimes this
- arg is a nil ptr! It's usually not fatal, but is irritating! */
- free( (char *) ptr );
+ /* the normal generated yyfree func just frees its first arg;
+ this get complaints on some systems, as sometimes this
+ arg is a nil ptr! It's usually not fatal, but is irritating! */
+ free( (char *) ptr );
}
int ast_expr(char *expr, char *buf, int length, struct ast_channel *chan)
@@ -287,8 +287,7 @@
else
buf[0] = 0;
return_value = strlen(buf);
- if (io.val->u.s)
- free(io.val->u.s);
+ free(io.val->u.s);
}
free(io.val);
}
More information about the asterisk-commits
mailing list