[asterisk-commits] rizzo: trunk r95073 - in /trunk/apps: app_dictate.c app_mp3.c app_voicemail.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Dec 27 17:32:19 CST 2007


Author: rizzo
Date: Thu Dec 27 17:32:18 2007
New Revision: 95073

URL: http://svn.digium.com/view/asterisk?view=rev&rev=95073
Log:
remove more unnecessary casts for NULL.
main/say.c is a big offender in this respect.


Modified:
    trunk/apps/app_dictate.c
    trunk/apps/app_mp3.c
    trunk/apps/app_voicemail.c

Modified: trunk/apps/app_dictate.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_dictate.c?view=diff&rev=95073&r1=95072&r2=95073
==============================================================================
--- trunk/apps/app_dictate.c (original)
+++ trunk/apps/app_dictate.c Thu Dec 27 17:32:18 2007
@@ -170,7 +170,7 @@
 						if (speed > 4) {
 							speed = 1;
 						}
-						res = ast_say_number(chan, speed, AST_DIGIT_ANY, chan->language, (char *) NULL);
+						res = ast_say_number(chan, speed, AST_DIGIT_ANY, chan->language, NULL);
 						break;
 					case '7':
 						samples -= ffactor;

Modified: trunk/apps/app_mp3.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_mp3.c?view=diff&rev=95073&r1=95072&r2=95073
==============================================================================
--- trunk/apps/app_mp3.c (original)
+++ trunk/apps/app_mp3.c Thu Dec 27 17:32:18 2007
@@ -82,19 +82,19 @@
 	/* Execute mpg123, but buffer if it's a net connection */
 	if (!strncasecmp(filename, "http://", 7)) {
 		/* Most commonly installed in /usr/local/bin */
-	    execl(LOCAL_MPG_123, "mpg123", "-q", "-s", "-b", "1024", "-f", "8192", "--mono", "-r", "8000", filename, (char *)NULL);
+	    execl(LOCAL_MPG_123, "mpg123", "-q", "-s", "-b", "1024", "-f", "8192", "--mono", "-r", "8000", filename, NULL);
 		/* But many places has it in /usr/bin */
-	    execl(MPG_123, "mpg123", "-q", "-s", "-b", "1024","-f", "8192", "--mono", "-r", "8000", filename, (char *)NULL);
+	    execl(MPG_123, "mpg123", "-q", "-s", "-b", "1024","-f", "8192", "--mono", "-r", "8000", filename, NULL);
 		/* As a last-ditch effort, try to use PATH */
-	    execlp("mpg123", "mpg123", "-q", "-s", "-b", "1024",  "-f", "8192", "--mono", "-r", "8000", filename, (char *)NULL);
+	    execlp("mpg123", "mpg123", "-q", "-s", "-b", "1024",  "-f", "8192", "--mono", "-r", "8000", filename, NULL);
 	}
 	else {
 		/* Most commonly installed in /usr/local/bin */
-	    execl(MPG_123, "mpg123", "-q", "-s", "-f", "8192", "--mono", "-r", "8000", filename, (char *)NULL);
+	    execl(MPG_123, "mpg123", "-q", "-s", "-f", "8192", "--mono", "-r", "8000", filename, NULL);
 		/* But many places has it in /usr/bin */
-	    execl(LOCAL_MPG_123, "mpg123", "-q", "-s", "-f", "8192", "--mono", "-r", "8000", filename, (char *)NULL);
+	    execl(LOCAL_MPG_123, "mpg123", "-q", "-s", "-f", "8192", "--mono", "-r", "8000", filename, NULL);
 		/* As a last-ditch effort, try to use PATH */
-	    execlp("mpg123", "mpg123", "-q", "-s", "-f", "8192", "--mono", "-r", "8000", filename, (char *)NULL);
+	    execlp("mpg123", "mpg123", "-q", "-s", "-f", "8192", "--mono", "-r", "8000", filename, NULL);
 	}
 	ast_log(LOG_WARNING, "Execute of mpg123 failed\n");
 	_exit(0);

Modified: trunk/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_voicemail.c?view=diff&rev=95073&r1=95072&r2=95073
==============================================================================
--- trunk/apps/app_voicemail.c (original)
+++ trunk/apps/app_voicemail.c Thu Dec 27 17:32:18 2007
@@ -3954,7 +3954,7 @@
 	if (d)
 		return d;
 	for (x = start; x< 5; x++) {	/* For all folders */
-		if ((d = ast_say_number(chan, x, AST_DIGIT_ANY, chan->language, (char *) NULL)))
+		if ((d = ast_say_number(chan, x, AST_DIGIT_ANY, chan->language, NULL)))
 			return d;
 		d = ast_play_and_wait(chan, "vm-for");	/* "for" */
 		if (d)
@@ -4699,7 +4699,7 @@
 		res = wait_file2(chan, vms, "vm-message");	/* "message" */
 		if (vms->curmsg && (vms->curmsg != vms->lastmsg)) {
 			if (!res)
-				res = ast_say_number(chan, vms->curmsg + 1, AST_DIGIT_ANY, chan->language, (char *) NULL);
+				res = ast_say_number(chan, vms->curmsg + 1, AST_DIGIT_ANY, chan->language, NULL);
 		}
 	}
 




More information about the asterisk-commits mailing list