From 79ab512ffd931a402ca29d279d670782b2cae1e4 Mon Sep 17 00:00:00 2001 From: markster Date: Sat, 25 Oct 2003 17:44:48 +0000 Subject: Compatibility issues on app_cut (bug #428) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1666 f38db490-d61c-443f-a65b-d21fe96a405b --- apps/app_cut.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'apps/app_cut.c') diff --git a/apps/app_cut.c b/apps/app_cut.c index f04668929..0bb1ab71d 100755 --- a/apps/app_cut.c +++ b/apps/app_cut.c @@ -13,16 +13,16 @@ * */ +#include +#include +#include +#include #include #include #include #include #include #include -#include -#include -#include -#include /* Maximum length of any variable */ #define MAXRESULT 1024 @@ -58,7 +58,7 @@ static int cut_exec(struct ast_channel *chan, void *data) /* Check and parse arguments */ if (data) { - s = strdupa((char *)data); + s = ast_strdupa((char *)data); if (s) { newvar = strsep(&s, "="); if (newvar && (newvar[0] != '\0')) { @@ -131,7 +131,7 @@ static int cut_exec(struct ast_channel *chan, void *data) /* Get to start, if any */ if (num1 > 0) { - while ((tmp2 != NULL + 1) && (curfieldnum < num1)) { + while ((tmp2 != (char *)NULL + 1) && (curfieldnum < num1)) { tmp2 = index(tmp2, d) + 1; curfieldnum++; } @@ -143,7 +143,7 @@ static int cut_exec(struct ast_channel *chan, void *data) } /* Re-null tmp2 if we added 1 to NULL */ - if (tmp2 == NULL + 1) + if (tmp2 == (char *)NULL + 1) tmp2 = NULL; /* Output fields until we either run out of fields or num2 is reached */ -- cgit v1.2.3