diff options
author | dvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-06-25 21:47:47 +0000 |
---|---|---|
committer | dvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-06-25 21:47:47 +0000 |
commit | 0d5c8ce213040fa6481a755b7a127e4b338d898b (patch) | |
tree | c679d17156971c1bd2a63bd5e2104708f14ac164 /main | |
parent | 85b3a0aa98cc4cb13c90e1abcfc9a3034a4029bc (diff) |
Merged revisions 203444 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r203444 | dvossel | 2009-06-25 16:45:32 -0500 (Thu, 25 Jun 2009) | 4 lines
fixes a few redundant conditions
(issue #15269)
........
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@203447 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r-- | main/ast_expr2.c | 1 | ||||
-rw-r--r-- | main/ast_expr2.fl | 11 |
2 files changed, 5 insertions, 7 deletions
diff --git a/main/ast_expr2.c b/main/ast_expr2.c index 037d19a6f..b7b533e7a 100644 --- a/main/ast_expr2.c +++ b/main/ast_expr2.c @@ -2397,7 +2397,6 @@ static void free_value (struct val *vp) { if (vp==NULL) { - free(vp); return; } if (vp->type == AST_EXPR_string || vp->type == AST_EXPR_numeric_string) diff --git a/main/ast_expr2.fl b/main/ast_expr2.fl index bcaf768d2..92345e975 100644 --- a/main/ast_expr2.fl +++ b/main/ast_expr2.fl @@ -242,10 +242,10 @@ int ast_yyerror(const char *, YYLTYPE *, struct parse_io *); /* likewise */ 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) @@ -286,8 +286,7 @@ int ast_expr(char *expr, char *buf, int length, struct ast_channel *chan) 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); } |