[Asterisk-cvs] asterisk/apps app_cut.c,1.1,1.2
markster at lists.digium.com
markster at lists.digium.com
Sat Oct 25 12:18:42 CDT 2003
Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv5739/apps
Modified Files:
app_cut.c
Log Message:
Compatibility issues on app_cut (bug #428)
Index: app_cut.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_cut.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- app_cut.c 22 Oct 2003 13:34:59 -0000 1.1
+++ app_cut.c 25 Oct 2003 17:44:48 -0000 1.2
@@ -13,16 +13,16 @@
*
*/
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
#include <asterisk/file.h>
#include <asterisk/logger.h>
#include <asterisk/options.h>
#include <asterisk/channel.h>
#include <asterisk/pbx.h>
#include <asterisk/module.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
/* Maximum length of any variable */
#define MAXRESULT 1024
@@ -58,7 +58,7 @@
/* 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 @@
/* 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 @@
}
/* 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 */
More information about the svn-commits
mailing list