[Asterisk-cvs] asterisk/apps app_adsiprog.c, 1.18, 1.19 app_alarmreceiver.c, 1.18, 1.19 app_authenticate.c, 1.18, 1.19 app_chanisavail.c, 1.25, 1.26 app_controlplayback.c, 1.16, 1.17 app_curl.c, 1.14, 1.15 app_db.c, 1.16, 1.17 app_dial.c, 1.174, 1.175 app_dictate.c, 1.8, 1.9 app_directed_pickup.c, 1.6, 1.7 app_directory.c, 1.48, 1.49 app_disa.c, 1.39, 1.40 app_dumpchan.c, 1.13, 1.14 app_enumlookup.c, 1.24, 1.25 app_externalivr.c, 1.12, 1.13 app_festival.c, 1.36, 1.37 app_forkcdr.c, 1.14, 1.15 app_groupcount.c, 1.24, 1.25 app_hasnewvoicemail.c, 1.20, 1.21 app_ices.c, 1.11, 1.12 app_image.c, 1.11, 1.12 app_ivrdemo.c, 1.11, 1.12 app_macro.c, 1.31, 1.32 app_math.c, 1.16, 1.17 app_md5.c, 1.11, 1.12 app_meetme.c, 1.115, 1.116 app_mp3.c, 1.30, 1.31 app_muxmon.c, 1.5, 1.6 app_osplookup.c, 1.13, 1.14 app_page.c, 1.8, 1.9 app_parkandannounce.c, 1.19, 1.20 app_playback.c, 1.23, 1.24 app_privacy.c, 1.19, 1.20 app_queue.c, 1.173, 1.174 app_random.c, 1.11, 1.12 app_read.c, 1.25, 1.26 app_readfile.c, 1.11, 1.12 app_realtime.c, 1.15, 1.16 app_record.c, 1.40, 1.41 app_rpt.c, 1.45, 1.46 app_senddtmf.c, 1.14, 1.15 app_sendtext.c, 1.12, 1.13 app_setcallerid.c, 1.13, 1.14 app_setcidname.c, 1.14, 1.15 app_skel.c, 1.16, 1.17 app_softhangup.c, 1.12, 1.13 app_sql_postgres.c, 1.16, 1.17 app_system.c, 1.21, 1.22 app_talkdetect.c, 1.16, 1.17 app_test.c, 1.15, 1.16 app_transfer.c, 1.17, 1.18 app_txtcidname.c, 1.21, 1.22 app_url.c, 1.14, 1.15 app_userevent.c, 1.10, 1.11 app_voicemail.c, 1.254, 1.255 app_while.c, 1.13, 1.14 app_zapateller.c, 1.13, 1.14 app_zapbarge.c, 1.13, 1.14

russell russell
Wed Oct 26 15:55:27 CDT 2005


Update of /usr/cvsroot/asterisk/apps
In directory mongoose.digium.com:/tmp/cvs-serv18393/apps

Modified Files:
	app_adsiprog.c app_alarmreceiver.c app_authenticate.c 
	app_chanisavail.c app_controlplayback.c app_curl.c app_db.c 
	app_dial.c app_dictate.c app_directed_pickup.c app_directory.c 
	app_disa.c app_dumpchan.c app_enumlookup.c app_externalivr.c 
	app_festival.c app_forkcdr.c app_groupcount.c 
	app_hasnewvoicemail.c app_ices.c app_image.c app_ivrdemo.c 
	app_macro.c app_math.c app_md5.c app_meetme.c app_mp3.c 
	app_muxmon.c app_osplookup.c app_page.c app_parkandannounce.c 
	app_playback.c app_privacy.c app_queue.c app_random.c 
	app_read.c app_readfile.c app_realtime.c app_record.c 
	app_rpt.c app_senddtmf.c app_sendtext.c app_setcallerid.c 
	app_setcidname.c app_skel.c app_softhangup.c 
	app_sql_postgres.c app_system.c app_talkdetect.c app_test.c 
	app_transfer.c app_txtcidname.c app_url.c app_userevent.c 
	app_voicemail.c app_while.c app_zapateller.c app_zapbarge.c 
Log Message:
remove unnecessary checks before calls to ast_strlen_zero


Index: app_adsiprog.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_adsiprog.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- app_adsiprog.c	24 Oct 2005 20:12:05 -0000	1.18
+++ app_adsiprog.c	26 Oct 2005 19:48:14 -0000	1.19
@@ -1555,7 +1555,7 @@
 
 	LOCAL_USER_ADD(u);
 	
-	if (!data || ast_strlen_zero(data))
+	if (ast_strlen_zero(data))
 		data = "asterisk.adsi";
 	
 	if (!adsi_available(chan)) {

Index: app_alarmreceiver.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_alarmreceiver.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- app_alarmreceiver.c	24 Oct 2005 20:12:05 -0000	1.18
+++ app_alarmreceiver.c	26 Oct 2005 19:48:14 -0000	1.19
@@ -117,7 +117,7 @@
 	char value[16];
 	
 	
-	if(!strlen(db_family))
+	if (ast_strlen_zero(db_family))
 		return; /* If not defined, don't do anything */
 	
 	res = ast_db_get(db_family, key, value, sizeof(value) - 1);
@@ -392,7 +392,7 @@
 	FILE *logfile;
 	event_node_t *elp = event;
 	
-	if(strlen(event_spool_dir)){
+	if (!ast_strlen_zero(event_spool_dir)) {
 		
 		/* Make a template */
 		
@@ -516,7 +516,7 @@
 				ast_verbose(VERBOSE_PREFIX_2 "AlarmReceiver: Incomplete string: %s, trying again...\n", event);
 
 			if(!got_some_digits){
-				got_some_digits = (strlen(event)) ? 1 : 0;
+				got_some_digits = (!ast_strlen_zero(event)) ? 1 : 0;
 				ack_retries++;
 			}
 			continue;	
@@ -715,7 +715,7 @@
 	* Do we exec a command line at the end?
 	*/
 	
-	if((!res) && (strlen(event_app)) && (event_head)){
+	if((!res) && (!ast_strlen_zero(event_app)) && (event_head)){
 		ast_log(LOG_DEBUG,"Alarmreceiver: executing: %s\n", event_app);
 		ast_safe_system(event_app);
 	}

Index: app_authenticate.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_authenticate.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- app_authenticate.c	24 Oct 2005 20:12:05 -0000	1.18
+++ app_authenticate.c	26 Oct 2005 19:48:14 -0000	1.19
@@ -85,7 +85,7 @@
 	char *opts;
 	char *prompt;
 	
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "Authenticate requires an argument(password)\n");
 		return -1;
 	}

Index: app_chanisavail.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_chanisavail.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- app_chanisavail.c	24 Oct 2005 20:12:05 -0000	1.25
+++ app_chanisavail.c	26 Oct 2005 19:48:14 -0000	1.26
@@ -74,7 +74,7 @@
 	char *info, tmp[512], trychan[512], *peers, *tech, *number, *rest, *cur, *options, *stringp;
 	struct ast_channel *tempchan;
 
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "ChanIsAvail requires an argument (Zap/1&Zap/2)\n");
 		return -1;
 	}

Index: app_controlplayback.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_controlplayback.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- app_controlplayback.c	24 Oct 2005 20:12:05 -0000	1.16
+++ app_controlplayback.c	26 Oct 2005 19:48:14 -0000	1.17
@@ -81,7 +81,7 @@
 		arg_restart = 6,
 	};
 	
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "ControlPlayback requires an argument (filename)\n");
 		return -1;
 	}

Index: app_curl.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_curl.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- app_curl.c	24 Oct 2005 20:12:05 -0000	1.14
+++ app_curl.c	26 Oct 2005 19:48:14 -0000	1.15
@@ -123,14 +123,14 @@
 		dep_warning = 1;
 	}
 
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "Curl requires an argument (URL)\n");
 		return -1;
 	}
 	
 	LOCAL_USER_ADD(u);
 	
-	if ((info = ast_strdupa((char *)data))) {
+	if ((info = ast_strdupa(data))) {
 		url = strsep(&info, "|");
 		post_data = info;
 	} else {
@@ -166,7 +166,7 @@
 
 	*buf = '\0';
 	
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "CURL requires an argument (URL)\n");
 		return buf;
 	}

Index: app_db.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_db.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- app_db.c	24 Oct 2005 20:12:05 -0000	1.16
+++ app_db.c	26 Oct 2005 19:48:14 -0000	1.17
@@ -97,7 +97,7 @@
 				LOCAL_USER_REMOVE(u);
 				return 0;
 			}
-		if (!strlen(keytree))
+		if (ast_strlen_zero(keytree))
 			keytree = 0;
 	} else {
 		family = argv;

Index: app_dial.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_dial.c,v
retrieving revision 1.174
retrieving revision 1.175
diff -u -d -r1.174 -r1.175
--- app_dial.c	24 Oct 2005 20:12:05 -0000	1.174
+++ app_dial.c	26 Oct 2005 19:48:14 -0000	1.175
@@ -399,7 +399,7 @@
 						if (ast_test_flag(o, DIAL_FORCECALLERID)) {
 							char *newcid = NULL;
 
-							if (strlen(in->macroexten))
+							if (!ast_strlen_zero(in->macroexten))
 								newcid = in->macroexten;
 							else
 								newcid = in->exten;
@@ -691,7 +691,7 @@
 	char *dblgoto = NULL;
 	int priority_jump = 0;
 
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "Dial requires an argument (technology1/number1&technology2/number2...|optional timeout|options)\n");
 		return -1;
 	}
@@ -731,7 +731,7 @@
 		}
 	} else
 		timeout = NULL;
-	if (!peers || ast_strlen_zero(peers)) {
+	if (ast_strlen_zero(peers)) {
 		ast_log(LOG_WARNING, "Dial argument takes format (technology1/number1&technology2/number2...|optional timeout)\n");
 		goto out;
 	}
@@ -965,7 +965,7 @@
 		char callerid[60];
 
 		l = chan->cid.cid_num;
-		if (l && !ast_strlen_zero(l)) {
+		if (!ast_strlen_zero(l)) {
 			ast_shrink_phone_number(l);
 			if( privacy ) {
 				if (option_verbose > 2)
@@ -1235,7 +1235,7 @@
 		cur = rest;
 	} while (cur);
 	
-	if (timeout && !ast_strlen_zero(timeout)) {
+	if (!ast_strlen_zero(timeout)) {
 		to = atoi(timeout);
 		if (to > 0)
 			to *= 1000;
@@ -1294,12 +1294,11 @@
 		if (!number)
 			number = numsubst;
 		pbx_builtin_setvar_helper(chan, "DIALEDPEERNUMBER", number);
- 		/* JDG: sendurl */
- 		if ( url && !ast_strlen_zero(url) && ast_channel_supports_html(peer) ) {
+ 		if (!ast_strlen_zero(url) && ast_channel_supports_html(peer) ) {
  			ast_log(LOG_DEBUG, "app_dial: sendurl=%s.\n", url);
  			ast_channel_sendurl( peer, url );
- 		} /* /JDG */
-		if( privacy || screen ) {
+ 		}
+		if (privacy || screen) {
 			int res2;
 			int loopcount = 0;
 			if( privdb_val == AST_PRIVACY_UNKNOWN ) {
@@ -1594,12 +1593,12 @@
 				time(&now);
 				chan->whentohangup = now + calldurationlimit;
 			}
-			if (dtmfcalled && !ast_strlen_zero(dtmfcalled)) { 
+			if (!ast_strlen_zero(dtmfcalled)) { 
 				if (option_verbose > 2)
 					ast_verbose(VERBOSE_PREFIX_3 "Sending DTMF '%s' to the called party.\n",dtmfcalled);
 				res = ast_dtmf_stream(peer,chan,dtmfcalled,250);
 			}
-			if (dtmfcalling && !ast_strlen_zero(dtmfcalling)) {
+			if (!ast_strlen_zero(dtmfcalling)) {
 				if (option_verbose > 2)
 					ast_verbose(VERBOSE_PREFIX_3 "Sending DTMF '%s' to the calling party.\n",dtmfcalling);
 				res = ast_dtmf_stream(chan,peer,dtmfcalling,250);
@@ -1698,7 +1697,7 @@
 	struct localuser *u;
 	struct ast_flags peerflags;
 	
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "RetryDial requires an argument!\n");
 		return -1;
 	}	

Index: app_dictate.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_dictate.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- app_dictate.c	24 Oct 2005 20:12:05 -0000	1.8
+++ app_dictate.c	26 Oct 2005 19:48:14 -0000	1.9
@@ -101,7 +101,7 @@
 	LOCAL_USER_ADD(u);
 	
 	snprintf(dftbase, sizeof(dftbase), "%s/dictate", ast_config_AST_SPOOL_DIR);
-	if (data && !ast_strlen_zero(data) && (mydata = ast_strdupa(data))) {
+	if (!ast_strlen_zero(data) && (mydata = ast_strdupa(data))) {
 		argc = ast_separate_app_args(mydata, '|', argv, sizeof(argv) / sizeof(argv[0]));
 	}
 	

Index: app_directed_pickup.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_directed_pickup.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- app_directed_pickup.c	24 Oct 2005 20:12:05 -0000	1.6
+++ app_directed_pickup.c	26 Oct 2005 19:48:14 -0000	1.7
@@ -57,7 +57,7 @@
 	char *tmp = NULL, *exten = NULL, *context = NULL;
 	char workspace[256] = "";
 
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "Pickup requires an argument (extension) !\n");
 		return -1;	
 	}

Index: app_directory.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_directory.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- app_directory.c	24 Oct 2005 20:12:05 -0000	1.48
+++ app_directory.c	26 Oct 2005 19:48:14 -0000	1.49
@@ -293,7 +293,7 @@
 	int lastuserchoice = 0;
 	char *start, *pos, *conv,*stringp=NULL;
 
-	if (!context || ast_strlen_zero(context)) {
+	if (ast_strlen_zero(context)) {
 		ast_log(LOG_WARNING,
 			"Directory must be called with an argument "
 			"(context in which to interpret extensions)\n");
@@ -410,7 +410,7 @@
 	int last = 1;
 	char *context, *dialcontext, *dirintro, *options;
 
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "Directory requires an argument (context[,dialcontext])\n");
 		return -1;
 	}
@@ -439,9 +439,9 @@
 	}
 
 	dirintro = ast_variable_retrieve(cfg, context, "directoryintro");
-	if (!dirintro || ast_strlen_zero(dirintro))
+	if (ast_strlen_zero(dirintro))
 		dirintro = ast_variable_retrieve(cfg, "general", "directoryintro");
-	if (!dirintro || ast_strlen_zero(dirintro)) {
+	if (ast_strlen_zero(dirintro)) {
 		if (last)
 			dirintro = "dir-intro";	
 		else

Index: app_disa.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_disa.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- app_disa.c	24 Oct 2005 20:12:05 -0000	1.39
+++ app_disa.c	26 Oct 2005 19:48:14 -0000	1.40
@@ -126,7 +126,7 @@
 	FILE *fp;
 	char *stringp=NULL;
 
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "disa requires an argument (passcode/passcode file)\n");
 		return -1;
 	}

Index: app_dumpchan.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_dumpchan.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- app_dumpchan.c	24 Oct 2005 20:12:05 -0000	1.13
+++ app_dumpchan.c	26 Oct 2005 19:48:14 -0000	1.14
@@ -141,7 +141,7 @@
 	
 	LOCAL_USER_ADD(u);
 
-	if (data && !ast_strlen_zero(data)) {
+	if (!ast_strlen_zero(data)) {
 		level = atoi(data);
 	}
 

Index: app_enumlookup.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_enumlookup.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- app_enumlookup.c	24 Oct 2005 20:12:05 -0000	1.24
+++ app_enumlookup.c	26 Oct 2005 19:48:14 -0000	1.25
@@ -85,7 +85,7 @@
 	static int dep_warning=0;
 	struct localuser *u;
 
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "EnumLookup requires an argument (extension)\n");
 		return -1;
 	}

Index: app_externalivr.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_externalivr.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- app_externalivr.c	24 Oct 2005 20:12:05 -0000	1.12
+++ app_externalivr.c	26 Oct 2005 19:48:14 -0000	1.13
@@ -262,7 +262,7 @@
 	AST_LIST_HEAD_INIT(&u->finishlist);
 	u->abort_current_sound = 0;
 	
-	if (!args || ast_strlen_zero(args)) {
+	if (ast_strlen_zero(args)) {
 		ast_log(LOG_WARNING, "ExternalIVR requires a command to execute\n");
 		goto exit;
 	}

Index: app_festival.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_festival.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- app_festival.c	24 Oct 2005 20:12:05 -0000	1.36
+++ app_festival.c	26 Oct 2005 19:48:14 -0000	1.37
@@ -296,7 +296,7 @@
 	char *intstr;
 	struct ast_config *cfg;
 
-	if (!vdata || ast_strlen_zero(vdata)) {
+	if (ast_strlen_zero(vdata)) {
 		ast_log(LOG_WARNING, "festival requires an argument (text)\n");
 		return -1;
 	}

Index: app_forkcdr.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_forkcdr.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- app_forkcdr.c	24 Oct 2005 20:12:05 -0000	1.14
+++ app_forkcdr.c	26 Oct 2005 19:48:14 -0000	1.15
@@ -74,7 +74,7 @@
 	int res=0;
 	struct localuser *u;
 	LOCAL_USER_ADD(u);
-	if (data && !ast_strlen_zero(data))
+	if (!ast_strlen_zero(data))
 		ast_set2_flag(chan->cdr, strchr((char *)data, 'v'), AST_CDR_FLAG_KEEP_VARS);
 	
 	ast_cdr_fork(chan);

Index: app_groupcount.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_groupcount.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- app_groupcount.c	24 Oct 2005 20:12:05 -0000	1.24
+++ app_groupcount.c	26 Oct 2005 19:48:14 -0000	1.25
@@ -145,7 +145,7 @@
 		deprecation_warning = 1;
 	}
 
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "CheckGroup requires an argument(max[@category])\n");
 		return res;
 	}

Index: app_hasnewvoicemail.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_hasnewvoicemail.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- app_hasnewvoicemail.c	24 Oct 2005 20:12:05 -0000	1.20
+++ app_hasnewvoicemail.c	26 Oct 2005 19:48:14 -0000	1.21
@@ -115,13 +115,13 @@
 
 	temps = input;
 	if ((temps = strsep(&input, "|"))) {
-		if (input && !ast_strlen_zero(input))
+		if (!ast_strlen_zero(input))
 			varname = input;
 		input = temps;
 	}
 
 	if ((vmbox = strsep(&input, "@")))
-		if (input && !ast_strlen_zero(input))
+		if (!ast_strlen_zero(input))
 			context = input;
 	if (!vmbox)
 		vmbox = input;

Index: app_ices.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_ices.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- app_ices.c	24 Oct 2005 20:12:05 -0000	1.11
+++ app_ices.c	26 Oct 2005 19:48:14 -0000	1.12
@@ -101,7 +101,7 @@
 	char filename[256]="";
 	char *c;
 
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "ICES requires an argument (configfile.xml)\n");
 		return -1;
 	}

Index: app_image.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_image.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- app_image.c	24 Oct 2005 20:12:05 -0000	1.11
+++ app_image.c	26 Oct 2005 19:48:14 -0000	1.12
@@ -61,7 +61,7 @@
 	int res = 0;
 	struct localuser *u;
 	
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "SendImage requires an argument (filename)\n");
 		return -1;
 	}

Index: app_ivrdemo.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_ivrdemo.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- app_ivrdemo.c	24 Oct 2005 20:12:05 -0000	1.11
+++ app_ivrdemo.c	26 Oct 2005 19:48:14 -0000	1.12
@@ -89,7 +89,7 @@
 	int res=0;
 	struct localuser *u;
 	
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "skel requires an argument (filename)\n");
 		return -1;
 	}

Index: app_macro.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_macro.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- app_macro.c	24 Oct 2005 20:12:05 -0000	1.31
+++ app_macro.c	26 Oct 2005 19:48:14 -0000	1.32
@@ -111,7 +111,7 @@
 	char *save_macro_offset;
 	struct localuser *u;
  
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "Macro() requires arguments. See \"show application macro\" for help.\n");
 		return -1;
 	}
@@ -137,7 +137,7 @@
 	tmp = ast_strdupa(data);
 	rest = tmp;
 	macro = strsep(&rest, "|");
-	if (!macro || ast_strlen_zero(macro)) {
+	if (ast_strlen_zero(macro)) {
 		ast_log(LOG_WARNING, "Invalid macro name specified\n");
 		LOCAL_USER_REMOVE(u);
 		return 0;

Index: app_math.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_math.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- app_math.c	24 Oct 2005 20:12:05 -0000	1.16
+++ app_math.c	26 Oct 2005 19:48:14 -0000	1.17
@@ -108,7 +108,7 @@
 		deprecation_warning = 1;
 	}
 
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "No parameters passed. !\n");
 		return -1;
 	}

Index: app_md5.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_md5.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- app_md5.c	24 Oct 2005 20:12:05 -0000	1.11
+++ app_md5.c	26 Oct 2005 19:48:14 -0000	1.12
@@ -73,7 +73,7 @@
 		dep_warning = 1;
 	}	
 
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "Syntax: md5(<varname>=<string>) - missing argument!\n");
 		return -1;
 	}
@@ -110,7 +110,7 @@
 		dep_warning = 1;
 	}
 	
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "Syntax: MD5Check(<md5hash>,<string>) - missing argument!\n");
 		return -1;
 	}

Index: app_meetme.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_meetme.c,v
retrieving revision 1.115
retrieving revision 1.116
diff -u -d -r1.115 -r1.116
--- app_meetme.c	24 Oct 2005 20:12:05 -0000	1.115
+++ app_meetme.c	26 Oct 2005 19:48:14 -0000	1.116
@@ -1663,7 +1663,7 @@
 	char *confnum, *localdata;
 	char val[80] = "0"; 
 
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "MeetMeCount requires an argument (conference number)\n");
 		return -1;
 	}
@@ -1684,7 +1684,7 @@
 	else
 		count = 0;
 
-	if (localdata && !ast_strlen_zero(localdata)){
+	if (!ast_strlen_zero(localdata)){
 		/* have var so load it and exit */
 		snprintf(val,sizeof(val), "%d",count);
 		pbx_builtin_setvar_helper(chan, localdata,val);
@@ -1714,7 +1714,7 @@
 
 	LOCAL_USER_ADD(u);
 
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		allowretry = 1;
 		notdata = "";
 	} else {
@@ -1972,7 +1972,7 @@
 
 	ast_mutex_lock(&conflock);
 	/* The param has the conference number the user and the command to execute */
-	if (data && !ast_strlen_zero(data)) {		
+	if (!ast_strlen_zero(data)) {		
 		params = ast_strdupa((char *) data);
 		conf = strsep(&params, "|");
 		command = strsep(&params, "|");

Index: app_mp3.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_mp3.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- app_mp3.c	24 Oct 2005 20:12:05 -0000	1.30
+++ app_mp3.c	26 Oct 2005 19:48:14 -0000	1.31
@@ -128,7 +128,7 @@
 		short frdata[160];
 	} myf;
 	
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "MP3 Playback requires an argument (filename)\n");
 		return -1;
 	}

Index: app_muxmon.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_muxmon.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- app_muxmon.c	24 Oct 2005 20:12:05 -0000	1.5
+++ app_muxmon.c	26 Oct 2005 19:48:14 -0000	1.6
@@ -385,7 +385,7 @@
 		*filename = NULL,
 		*post_process = NULL;
 	
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "muxmon requires an argument\n");
 		return -1;
 	}
@@ -409,7 +409,7 @@
 		}
 	}
 	
-	if (!filename || ast_strlen_zero(filename)) {
+	if (ast_strlen_zero(filename)) {
 		ast_log(LOG_WARNING, "Muxmon requires an argument (filename)\n");
 		LOCAL_USER_REMOVE(u);
 		return -1;

Index: app_osplookup.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_osplookup.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- app_osplookup.c	24 Oct 2005 20:12:05 -0000	1.13
+++ app_osplookup.c	26 Oct 2005 19:48:14 -0000	1.14
@@ -110,7 +110,7 @@
 	char *provider, *opts=NULL;
 	struct ast_osp_result result;
 	
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "OSPLookup requires an argument (extension)\n");
 		return -1;
 	}
@@ -169,7 +169,7 @@
 	int cause;
 	struct ast_osp_result result;
 
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "OSPNext should have an argument (cause)\n");
 		return -1;
 	}
@@ -179,7 +179,7 @@
 	cause = str2cause((char *)data);
 	temp = pbx_builtin_getvar_helper(chan, "OSPHANDLE");
 	result.handle = -1;
-	if (temp && strlen(temp) && (sscanf(temp, "%d", &result.handle) == 1) && (result.handle > -1)) {
+	if (!ast_strlen_zero(temp) && (sscanf(temp, "%d", &result.handle) == 1) && (result.handle > -1)) {
 		if ((res = ast_osp_next(&result, cause)) > 0) {
 			char tmp[80];
 			snprintf(tmp, sizeof(tmp), "%d", result.handle);
@@ -217,7 +217,7 @@
 	time_t start=0, duration=0;
 	struct ast_osp_result result;
 
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "OSPFinish should have an argument (cause)\n");
 		return -1;
 	}
@@ -236,7 +236,7 @@
 	cause = str2cause((char *)data);
 	temp = pbx_builtin_getvar_helper(chan, "OSPHANDLE");
 	result.handle = -1;
-	if (temp && strlen(temp) && (sscanf(temp, "%d", &result.handle) == 1) && (result.handle > -1)) {
+	if (!ast_strlen_zero(temp) && (sscanf(temp, "%d", &result.handle) == 1) && (result.handle > -1)) {
 		if (!ast_osp_terminate(result.handle, cause, start, duration)) {
 			pbx_builtin_setvar_helper(chan, "_OSPHANDLE", "");
 			res = 1;

Index: app_page.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_page.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- app_page.c	24 Oct 2005 20:12:05 -0000	1.8
+++ app_page.c	26 Oct 2005 19:48:14 -0000	1.9
@@ -120,7 +120,7 @@
 	char *tmp;
 	int res=0;
 
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "This application requires at least one argument (destination(s) to page)\n");
 		return -1;
 	}

Index: app_parkandannounce.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_parkandannounce.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- app_parkandannounce.c	24 Oct 2005 20:12:05 -0000	1.19
+++ app_parkandannounce.c	26 Oct 2005 19:48:14 -0000	1.20
@@ -81,7 +81,7 @@
 
 	struct localuser *u;
 
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "ParkAndAnnounce requires arguments: (announce:template|timeout|dial|[return_context])\n");
 		return -1;
 	}

Index: app_playback.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_playback.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- app_playback.c	24 Oct 2005 20:12:05 -0000	1.23
+++ app_playback.c	26 Oct 2005 19:48:14 -0000	1.24
@@ -70,7 +70,7 @@
 	char *stringp = NULL;
 	char *front = NULL, *back = NULL;
 	
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "Playback requires an argument (filename)\n");
 		return -1;
 	}

Index: app_privacy.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_privacy.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- app_privacy.c	24 Oct 2005 20:12:05 -0000	1.19
+++ app_privacy.c	26 Oct 2005 19:48:14 -0000	1.20
@@ -85,7 +85,7 @@
 	struct ast_config *cfg;
 
 	LOCAL_USER_ADD (u);
-	if (chan->cid.cid_num && !ast_strlen_zero(chan->cid.cid_num)) {
+	if (!ast_strlen_zero(chan->cid.cid_num)) {
 		if (option_verbose > 2)
 			ast_verbose (VERBOSE_PREFIX_3 "CallerID Present: Skipping\n");
 	} else {

Index: app_queue.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_queue.c,v
retrieving revision 1.173
retrieving revision 1.174
diff -u -d -r1.173 -r1.174
--- app_queue.c	24 Oct 2005 20:12:05 -0000	1.173
+++ app_queue.c	26 Oct 2005 19:48:14 -0000	1.174
@@ -2554,7 +2554,7 @@
 	struct localuser *u;
 	char *queuename, *interface;
 
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "PauseQueueMember requires an argument ([queuename]|interface])\n");
 		return -1;
 	}
@@ -2598,7 +2598,7 @@
 	struct localuser *u;
 	char *queuename, *interface;
 
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "UnpauseQueueMember requires an argument ([queuename]|interface])\n");
 		return -1;
 	}
@@ -2645,7 +2645,7 @@
 	char tmpchan[256]="";
 	char *interface = NULL;
 
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "RemoveQueueMember requires an argument (queuename[|interface])\n");
 		return -1;
 	}
@@ -2709,7 +2709,7 @@
 	char *penaltys=NULL;
 	int penalty = 0;
 
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "AddQueueMember requires an argument (queuename[|[interface][|penalty]])\n");
 		return -1;
 	}
@@ -2737,14 +2737,14 @@
 				penaltys++;
 			}
 		}
-		if (!interface || ast_strlen_zero(interface)) {
+		if (ast_strlen_zero(interface)) {
 			ast_copy_string(tmpchan, chan->name, sizeof(tmpchan));
 			interface = strrchr(tmpchan, '-');
 			if (interface)
 				*interface = '\0';
 			interface = tmpchan;
 		}
-		if (penaltys && !ast_strlen_zero(penaltys)) {
+		if (!ast_strlen_zero(penaltys)) {
 			if ((sscanf(penaltys, "%d", &penalty) != 1) || penalty < 0) {
 				ast_log(LOG_WARNING, "Penalty '%s' is invalid, must be an integer >= 0\n", penaltys);
 				penalty = 0;
@@ -2797,7 +2797,7 @@
 	/* Our queue entry */
 	struct queue_ent qe;
 	
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "Queue requires an argument: queuename[|options[|URL][|announceoverride][|timeout]]\n");
 		return -1;
 	}
@@ -3035,7 +3035,7 @@
 
 	ast_copy_string(buf, "0", len);
 	
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_ERROR, "QUEUEAGENTCOUNT requires an argument: queuename\n");
 		LOCAL_USER_REMOVE(u);
 		return buf;

Index: app_random.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_random.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- app_random.c	24 Oct 2005 20:12:05 -0000	1.11
+++ app_random.c	26 Oct 2005 19:48:14 -0000	1.12
@@ -63,7 +63,7 @@
 	char *prob;
 	int probint;
 	
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "Random requires an argument ([probability]:[[context|]extension|]priority)\n");
 		return -1;
 	}

Index: app_read.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_read.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- app_read.c	24 Oct 2005 20:12:05 -0000	1.25
+++ app_read.c	26 Oct 2005 19:48:14 -0000	1.26
@@ -89,7 +89,7 @@
 	char *argcopy = NULL;
 	char *args[8];
 
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "Read requires an argument (variable)\n");
 		return -1;
 	}
@@ -143,7 +143,7 @@
 			to *= 1000;
 	}
 
-	if (!(filename) || ast_strlen_zero(filename)) 
+	if (ast_strlen_zero(filename)) 
 		filename = NULL;
 	if (maxdigitstr) {
 		maxdigits = atoi(maxdigitstr);
@@ -152,7 +152,7 @@
 		} else if (option_verbose > 2)
 			ast_verbose(VERBOSE_PREFIX_3 "Accepting a maximum of %d digits.\n", maxdigits);
 	}
-	if (!(varname) || ast_strlen_zero(varname)) {
+	if (ast_strlen_zero(varname)) {
 		ast_log(LOG_WARNING, "Invalid! Usage: Read(variable[|filename][|maxdigits][|option][|attempts][|timeout])\n\n");
 		LOCAL_USER_REMOVE(u);
 		return -1;

Index: app_readfile.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_readfile.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- app_readfile.c	24 Oct 2005 20:12:05 -0000	1.11
+++ app_readfile.c	26 Oct 2005 19:48:14 -0000	1.12
@@ -63,7 +63,7 @@
 	char *s, *varname=NULL, *file=NULL, *length=NULL, *returnvar=NULL;
 	int len=0;
 
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "ReadFile require an argument!\n");
 		return -1;
 	}

Index: app_realtime.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_realtime.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- app_realtime.c	24 Oct 2005 20:12:05 -0000	1.15
+++ app_realtime.c	26 Oct 2005 19:48:14 -0000	1.16
@@ -130,7 +130,7 @@
 	struct localuser *u;
 	int res = 0;
 
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_ERROR,"Invalid input: usage %s\n",UUSAGE);
 		return -1;
 	}
@@ -171,7 +171,7 @@
 	char *family=NULL, *colmatch=NULL, *value=NULL, *prefix=NULL, *vname=NULL;
 	size_t len;
 		
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_ERROR,"Invalid input: usage %s\n",USAGE);
 		return -1;
 	}

Index: app_record.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_record.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- app_record.c	24 Oct 2005 20:12:05 -0000	1.40
+++ app_record.c	26 Oct 2005 19:48:14 -0000	1.41
@@ -100,7 +100,7 @@
 	int flags;
 	
 	/* The next few lines of code parse out the filename and header from the input string */
-	if (!data || ast_strlen_zero(data)) { /* no data implies no filename or anything is present */
+	if (ast_strlen_zero(data)) { /* no data implies no filename or anything is present */
 		ast_log(LOG_WARNING, "Record requires an argument (filename)\n");
 		return -1;
 	}

Index: app_rpt.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_rpt.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -d -r1.45 -r1.46
--- app_rpt.c	26 Oct 2005 16:00:38 -0000	1.45
+++ app_rpt.c	26 Oct 2005 19:48:14 -0000	1.46
@@ -5839,7 +5839,7 @@
 	ZT_PARAMS par;
 	int ms,elap;
 
-	if (!data || ast_strlen_zero((char *)data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "Rpt requires an argument (system node)\n");
 		return -1;
 	}

Index: app_senddtmf.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_senddtmf.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- app_senddtmf.c	24 Oct 2005 20:12:05 -0000	1.14
+++ app_senddtmf.c	26 Oct 2005 19:48:14 -0000	1.15
@@ -62,7 +62,7 @@
 	char *digits = NULL, *to = NULL;
 	int timeout = 250;
 
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "SendDTMF requires an argument (digits or *#aAbBcCdD)\n");
 		return 0;
 	}

Index: app_sendtext.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_sendtext.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- app_sendtext.c	24 Oct 2005 20:12:05 -0000	1.12
+++ app_sendtext.c	26 Oct 2005 19:48:14 -0000	1.13
@@ -71,7 +71,7 @@
 	struct localuser *u;
 	char *status = "UNSUPPORTED";
 		
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "SendText requires an argument (text)\n");
 		return -1;
 	}

Index: app_setcallerid.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_setcallerid.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- app_setcallerid.c	24 Oct 2005 20:12:05 -0000	1.13
+++ app_setcallerid.c	26 Oct 2005 19:48:14 -0000	1.14
@@ -106,7 +106,7 @@
 	char *opt;
 	int anitoo = 0;
 
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "SetCallerID requires an argument!\n");
 		return 0;
 	}

Index: app_setcidname.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_setcidname.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- app_setcidname.c	24 Oct 2005 20:12:05 -0000	1.14
+++ app_setcidname.c	26 Oct 2005 19:48:14 -0000	1.15
@@ -70,7 +70,7 @@
 		deprecation_warning = 1;
 	}
 
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_ERROR, "SetCIDName requires an argument!\n");
 		return 0;	
 	}

Index: app_skel.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_skel.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- app_skel.c	24 Oct 2005 20:12:05 -0000	1.16
+++ app_skel.c	26 Oct 2005 19:48:14 -0000	1.17
@@ -72,7 +72,7 @@
 	char *opts[2];
 	char *argv[2];
 
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "%s requires an argument (dummy|[options])\n",app);
 		LOCAL_USER_REMOVE(u);
 		return -1;
@@ -96,7 +96,7 @@
 		ast_parseoptions(app_opts, &flags, opts, options);
 	}
 
-	if (dummy && !ast_strlen_zero(dummy)) 
+	if (!ast_strlen_zero(dummy)) 
 		ast_log(LOG_NOTICE, "Dummy value is : %s\n", dummy);
 
 	if (ast_test_flag(&flags, OPTION_A))

Index: app_softhangup.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_softhangup.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- app_softhangup.c	24 Oct 2005 20:12:05 -0000	1.12
+++ app_softhangup.c	26 Oct 2005 19:48:14 -0000	1.13
@@ -61,7 +61,7 @@
 	char name[AST_CHANNEL_NAME] = "";
 	int all = 0;
 	
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
                 ast_log(LOG_WARNING, "SoftHangup requires an argument (Technology/resource)\n");
 		return 0;
 	}

Index: app_sql_postgres.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_sql_postgres.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- app_sql_postgres.c	24 Oct 2005 20:12:05 -0000	1.16
+++ app_sql_postgres.c	26 Oct 2005 19:48:14 -0000	1.17
@@ -504,7 +504,7 @@
 	struct localuser *u;
 	int result;
 
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "APP_PGSQL requires an argument (see manual)\n");
 		return -1;
 	}

Index: app_system.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_system.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- app_system.c	24 Oct 2005 20:12:05 -0000	1.21
+++ app_system.c	26 Oct 2005 19:48:14 -0000	1.22
@@ -90,7 +90,7 @@
 	int res=0;
 	struct localuser *u;
 	
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "System requires an argument(command)\n");
 		pbx_builtin_setvar_helper(chan, chanvar, "FAILURE");
 		return failmode;

Index: app_talkdetect.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_talkdetect.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- app_talkdetect.c	24 Oct 2005 20:12:05 -0000	1.16
+++ app_talkdetect.c	26 Oct 2005 19:48:14 -0000	1.17
@@ -78,7 +78,7 @@
 	int origrformat=0;
 	struct ast_dsp *dsp;
 	
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "BackgroundDetect requires an argument (filename)\n");
 		return -1;
 	}

Index: app_test.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_test.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- app_test.c	24 Oct 2005 20:12:05 -0000	1.15
+++ app_test.c	26 Oct 2005 19:48:14 -0000	1.16
@@ -137,7 +137,7 @@
 	FILE *f;
 	
 	/* Check for test id */
-	if (!testid || ast_strlen_zero(testid)) {
+	if (ast_strlen_zero(testid)) {
 		ast_log(LOG_WARNING, "TestClient requires an argument - the test id\n");
 		return -1;
 	}

Index: app_transfer.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_transfer.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- app_transfer.c	24 Oct 2005 20:12:05 -0000	1.17
+++ app_transfer.c	26 Oct 2005 19:48:14 -0000	1.18
@@ -75,7 +75,7 @@
 	char *dest = data;
 	char *status;
 
-	if (!dest || ast_strlen_zero(dest)) {
+	if (ast_strlen_zero(dest)) {
 		ast_log(LOG_WARNING, "Transfer requires an argument ([Tech/]destination)\n");
 		pbx_builtin_setvar_helper(chan, "TRANSFERSTATUS", "FAILURE");
 		return 0;

Index: app_txtcidname.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_txtcidname.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- app_txtcidname.c	24 Oct 2005 20:12:05 -0000	1.21
+++ app_txtcidname.c	26 Oct 2005 19:48:14 -0000	1.22
@@ -71,7 +71,7 @@
 		dep_warning = 1;
 	}
 	
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "TXTCIDName requires an argument (extension)\n");
 		res = 1;
 	}

Index: app_url.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_url.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- app_url.c	24 Oct 2005 20:12:05 -0000	1.14
+++ app_url.c	26 Oct 2005 19:48:14 -0000	1.15
@@ -81,7 +81,7 @@
 	char *stringp=NULL;
 	char *status = "FAILURE";
 	
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "SendURL requires an argument (URL)\n");
 		pbx_builtin_setvar_helper(chan, "SENDURLSTATUS", status);
 		return -1;

Index: app_userevent.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_userevent.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- app_userevent.c	24 Oct 2005 20:12:05 -0000	1.10
+++ app_userevent.c	26 Oct 2005 19:48:14 -0000	1.11
@@ -66,7 +66,7 @@
 	char eventname[512];
 	char *eventbody;
 
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "UserEvent requires an argument (eventname|optional event body)\n");
 		return -1;
 	}

Index: app_voicemail.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_voicemail.c,v
retrieving revision 1.254
retrieving revision 1.255
diff -u -d -r1.254 -r1.255
--- app_voicemail.c	24 Oct 2005 20:12:05 -0000	1.254
+++ app_voicemail.c	26 Oct 2005 19:48:14 -0000	1.255
@@ -2973,7 +2973,7 @@
 				stringp = (char *)buf;
 				strsep(&stringp, "=");
 				val = strsep(&stringp, "=");
-				if (val && !ast_strlen_zero(val)) {
+				if (!ast_strlen_zero(val)) {
 					if (!strcmp((char *)buf, "callerid"))
 						ast_copy_string(cid, val, sizeof(cid));
 					if (!strcmp((char *)buf, "origdate"))
@@ -3586,7 +3586,7 @@
 {
 	int res = 0;
 
-	if (category && !ast_strlen_zero(category))
+	if (!ast_strlen_zero(category))
 		res = ast_play_and_wait(chan, category);
 
 	return res;
@@ -4956,7 +4956,7 @@
 		if (useadsi)
 			adsi_password(chan);
 
-		if (prefix && !ast_strlen_zero(prefix)) {
+		if (!ast_strlen_zero(prefix)) {
 			char fullusername[80] = "";
 			ast_copy_string(fullusername, prefix, sizeof(fullusername));
 			strncat(fullusername, mailbox, sizeof(fullusername) - 1 - strlen(fullusername));
@@ -4987,7 +4987,7 @@
 		else {
 			if (option_verbose > 2)
 				ast_verbose( VERBOSE_PREFIX_3 "Incorrect password '%s' for user '%s' (context = %s)\n", password, mailbox, context ? context : "<any>");
-			if (prefix && !ast_strlen_zero(prefix))
+			if (!ast_strlen_zero(prefix))
 				mailbox[0] = '\0';
 		}
 		logretries++;
@@ -5051,7 +5051,7 @@
 	if (chan->_state != AST_STATE_UP)
 		ast_answer(chan);
 
-	if (data && !ast_strlen_zero(data)) {
+	if (!ast_strlen_zero(data)) {
 		char *tmp;
 		int argc;
 		char *argv[2];
@@ -5127,7 +5127,7 @@
 	vms.heard = calloc(vmu->maxmsg, sizeof(int));
 	
 	/* Set language from config to override channel language */
-	if (vmu->language && !ast_strlen_zero(vmu->language))
+	if (!ast_strlen_zero(vmu->language))
 		ast_copy_string(chan->language, vmu->language, sizeof(chan->language));
 	snprintf(vms.curdir, sizeof(vms.curdir), "%s/%s", VM_SPOOL_DIR, vmu->context);
 	mkdir(vms.curdir, 0700);
@@ -5483,7 +5483,7 @@
 	if (chan->_state != AST_STATE_UP)
 		ast_answer(chan);
 
-	if (data && !ast_strlen_zero(data)) {
+	if (!ast_strlen_zero(data)) {
 		ast_copy_string(tmp, data, sizeof(tmp));
 		argc = ast_separate_app_args(tmp, '|', argv, sizeof(argv) / sizeof(argv[0]));
 		if (argc == 2) {
@@ -5591,7 +5591,7 @@
 	struct ast_vm_user svm;
 	char *context, *box;
 
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_ERROR, "MailboxExists requires an argument: (vmbox[@context])\n");
 		return -1;
 	}
@@ -5968,7 +5968,7 @@
 			ast_log(LOG_DEBUG,"VM_CID Internal context string: %s\n",s);
 			stringp = ast_strdupa(s);
 			for (x = 0 ; x < MAX_NUM_CID_CONTEXTS ; x++){
-				if ((stringp)&&(!ast_strlen_zero(stringp))){
+				if (!ast_strlen_zero(stringp)) {
 					q = strsep(&stringp,",");
 					while ((*q == ' ')||(*q == '\t')) /* Eat white space between contexts */
 						q++;

Index: app_while.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_while.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- app_while.c	24 Oct 2005 20:12:05 -0000	1.13
+++ app_while.c	26 Oct 2005 19:48:14 -0000	1.14
@@ -249,7 +249,7 @@
 	memset(my_name, 0, size);
 	snprintf(my_name, size, "%s_%s_%d", chan->context, chan->exten, chan->priority);
 	
-	if (!label || ast_strlen_zero(label)) {
+	if (ast_strlen_zero(label)) {
 		if (end) 
 			label = used_index;
 		else if (!(label = pbx_builtin_getvar_helper(chan, my_name))) {

Index: app_zapateller.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_zapateller.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- app_zapateller.c	24 Oct 2005 20:12:05 -0000	1.13
+++ app_zapateller.c	26 Oct 2005 19:48:14 -0000	1.14
@@ -68,7 +68,7 @@
 
 	stringp=data;
         c = strsep(&stringp, "|");
-        while(c && !ast_strlen_zero(c)) {
+        while(!ast_strlen_zero(c)) {
 		if (!strcasecmp(c, "answer"))
 			answer = 1;
 		else if (!strcasecmp(c, "nocallerid"))

Index: app_zapbarge.c
===================================================================
RCS file: /usr/cvsroot/asterisk/apps/app_zapbarge.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- app_zapbarge.c	24 Oct 2005 20:12:05 -0000	1.13
+++ app_zapbarge.c	26 Oct 2005 19:48:14 -0000	1.14
@@ -269,7 +269,7 @@
 
 	LOCAL_USER_ADD(u);
 	
-	if (data && !ast_strlen_zero(data)) {
+	if (!ast_strlen_zero(data)) {
 		if ((sscanf(data, "Zap/%d", &confno) != 1) &&
 		    (sscanf(data, "%d", &confno) != 1)) {
 			ast_log(LOG_WARNING, "ZapBarge Argument (if specified) must be a channel number, not '%s'\n", (char *)data);




More information about the svn-commits mailing list