[svn-commits] mmichelson: branch 1.4 r184078 - /branches/1.4/apps/app_senddtmf.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Tue Mar 24 17:34:59 CDT 2009


Author: mmichelson
Date: Tue Mar 24 17:34:45 2009
New Revision: 184078

URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=184078
Log:
Change NULL pointer check to be ast_strlen_zero.

The 'digit' variable is guaranteed to be non-NULL, so the if
statement could never evaluate true. Changing to ast_strlen_zero
makes the logic correct.

This was found while reviewing ast_channel_ao2 code review.


Modified:
    branches/1.4/apps/app_senddtmf.c

Modified: branches/1.4/apps/app_senddtmf.c
URL: http://svn.digium.com/svn-view/asterisk/branches/1.4/apps/app_senddtmf.c?view=diff&rev=184078&r1=184077&r2=184078
==============================================================================
--- branches/1.4/apps/app_senddtmf.c (original)
+++ branches/1.4/apps/app_senddtmf.c Tue Mar 24 17:34:45 2009
@@ -104,7 +104,7 @@
 		astman_send_error(s, m, "Channel not specified");
 		return 0;
 	}
-	if (!digit) {
+	if (ast_strlen_zero(digit)) {
 		astman_send_error(s, m, "No digit specified");
 		ast_mutex_unlock(&chan->lock);
 		return 0;




More information about the svn-commits mailing list