[asterisk-commits] rizzo: trunk r47170 - /trunk/apps/app_dial.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Nov 3 15:01:35 MST 2006


Author: rizzo
Date: Fri Nov  3 16:01:34 2006
New Revision: 47170

URL: http://svn.digium.com/view/asterisk?rev=47170&view=rev
Log:
remove redundant checks


Modified:
    trunk/apps/app_dial.c

Modified: trunk/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_dial.c?rev=47170&r1=47169&r2=47170&view=diff
==============================================================================
--- trunk/apps/app_dial.c (original)
+++ trunk/apps/app_dial.c Fri Nov  3 16:01:34 2006
@@ -710,7 +710,8 @@
 				return NULL;
 			}
 
-			if (f && (f->frametype == AST_FRAME_DTMF)) {
+			/* now f is guaranteed non-NULL */
+			if (f->frametype == AST_FRAME_DTMF) {
 				if (ast_test_flag(peerflags, OPT_DTMF_EXIT)) {
 					const char *context = pbx_builtin_getvar_helper(in, "EXITCONTEXT");
 					if (onedigit_goto(in, context, (char) f->subclass, 1)) {
@@ -736,7 +737,7 @@
 			}
 
 			/* Forward HTML stuff */
-			if (single && f && (f->frametype == AST_FRAME_HTML) && !ast_test_flag(outgoing, DIAL_NOFORWARDHTML)) 
+			if (single && (f->frametype == AST_FRAME_HTML) && !ast_test_flag(outgoing, DIAL_NOFORWARDHTML)) 
 				if(ast_channel_sendhtml(outgoing->chan, f->subclass, f->data, f->datalen) == -1)
 					ast_log(LOG_WARNING, "Unable to send URL\n");
 			



More information about the asterisk-commits mailing list