remove more unnecessary casts for NULL.
authorLuigi Rizzo <rizzo@icir.org>
Thu, 27 Dec 2007 23:32:18 +0000 (23:32 +0000)
committerLuigi Rizzo <rizzo@icir.org>
Thu, 27 Dec 2007 23:32:18 +0000 (23:32 +0000)
main/say.c is a big offender in this respect.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@95073 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_dictate.c
apps/app_mp3.c
apps/app_voicemail.c

index abd0ec1..58d6111 100644 (file)
@@ -170,7 +170,7 @@ static int dictate_exec(struct ast_channel *chan, void *data)
                                                if (speed > 4) {
                                                        speed = 1;
                                                }
                                                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;
                                                break;
                                        case '7':
                                                samples -= ffactor;
index d2f2f5c..9a48952 100644 (file)
@@ -82,19 +82,19 @@ static int mp3play(char *filename, int fd)
        /* Execute mpg123, but buffer if it's a net connection */
        if (!strncasecmp(filename, "http://", 7)) {
                /* Most commonly installed in /usr/local/bin */
        /* 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 */
                /* 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 */
                /* 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 */
        }
        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 */
                /* 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 */
                /* 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);
        }
        ast_log(LOG_WARNING, "Execute of mpg123 failed\n");
        _exit(0);
index 22254f0..b3c687a 100644 (file)
@@ -3954,7 +3954,7 @@ static int get_folder(struct ast_channel *chan, int start)
        if (d)
                return d;
        for (x = start; x< 5; x++) {    /* For all folders */
        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)
                        return d;
                d = ast_play_and_wait(chan, "vm-for");  /* "for" */
                if (d)
@@ -4699,7 +4699,7 @@ static int play_message(struct ast_channel *chan, struct ast_vm_user *vmu, struc
                res = wait_file2(chan, vms, "vm-message");      /* "message" */
                if (vms->curmsg && (vms->curmsg != vms->lastmsg)) {
                        if (!res)
                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);
                }
        }
 
                }
        }