diff --git a/apps/app_adsiprog.c b/apps/app_adsiprog.c
index d7d7c364d771b869bb5088550c6ebd79ceb1dfa3..d3e525460df51abb0d45448b03591c78e1a000de 100755
--- a/apps/app_adsiprog.c
+++ b/apps/app_adsiprog.c
@@ -1555,7 +1555,7 @@ static int adsi_exec(struct ast_channel *chan, void *data)
 
 	LOCAL_USER_ADD(u);
 	
-	if (!data || ast_strlen_zero(data))
+	if (ast_strlen_zero(data))
 		data = "asterisk.adsi";
 	
 	if (!adsi_available(chan)) {
diff --git a/apps/app_alarmreceiver.c b/apps/app_alarmreceiver.c
index 3e8fe4cce0f4a99aa08ee066e459d69c5b7c0987..0d00d1d343968693ba86d2f098c3582e99167374 100755
--- a/apps/app_alarmreceiver.c
+++ b/apps/app_alarmreceiver.c
@@ -117,7 +117,7 @@ static void database_increment( char *key )
 	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 @@ static int log_events(struct ast_channel *chan,  char *signalling_type, event_no
 	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 @@ static int receive_ademco_contact_id( struct ast_channel *chan, void *data, int
 				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 @@ static int alarmreceiver_exec(struct ast_channel *chan, void *data)
 	* 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);
 	}
diff --git a/apps/app_authenticate.c b/apps/app_authenticate.c
index 593ced433f875caa34e0111c1350ab05b5800dd0..350fdc51c966abb47759dbc178ed61c011e3adcf 100755
--- a/apps/app_authenticate.c
+++ b/apps/app_authenticate.c
@@ -85,7 +85,7 @@ static int auth_exec(struct ast_channel *chan, void *data)
 	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;
 	}
diff --git a/apps/app_chanisavail.c b/apps/app_chanisavail.c
index 9975eebb48508f21263baf9b13861001103a96b4..0f51481a94b771e6b4128069b22276c02ff7ab1e 100755
--- a/apps/app_chanisavail.c
+++ b/apps/app_chanisavail.c
@@ -74,7 +74,7 @@ static int chanavail_exec(struct ast_channel *chan, void *data)
 	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;
 	}
diff --git a/apps/app_controlplayback.c b/apps/app_controlplayback.c
index b8e68a3dc5d2ebc500e2c87754665e82ab7953ce..21320ac9da0b3cb9d39efbd659fd9ef295781e68 100755
--- a/apps/app_controlplayback.c
+++ b/apps/app_controlplayback.c
@@ -81,7 +81,7 @@ static int controlplayback_exec(struct ast_channel *chan, void *data)
 		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;
 	}
diff --git a/apps/app_curl.c b/apps/app_curl.c
index 596b908b68675215056f89f8bec8e6df24d22f2d..aa7f73731326820ce3437284db207a449dbc52bb 100755
--- a/apps/app_curl.c
+++ b/apps/app_curl.c
@@ -123,14 +123,14 @@ static int curl_exec(struct ast_channel *chan, void *data)
 		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 @@ static char *acf_curl_exec(struct ast_channel *chan, char *cmd, char *data, char
 
 	*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;
 	}
diff --git a/apps/app_db.c b/apps/app_db.c
index e808c8ef61bf0b5c9946bb5cd1f2b5c802ae1d90..0cc0344d53c2f254e43a5fa0730a2efe6127df66 100755
--- a/apps/app_db.c
+++ b/apps/app_db.c
@@ -97,7 +97,7 @@ static int deltree_exec(struct ast_channel *chan, void *data)
 				LOCAL_USER_REMOVE(u);
 				return 0;
 			}
-		if (!strlen(keytree))
+		if (ast_strlen_zero(keytree))
 			keytree = 0;
 	} else {
 		family = argv;
diff --git a/apps/app_dial.c b/apps/app_dial.c
index 5792e34a21e3a9576255e0ee3ae2e4bc8cc9e3a8..36e5030d03acabad5d7df59604f33a824a4ea311 100755
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -399,7 +399,7 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localu
 						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 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
 	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 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
 		}
 	} 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 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
 		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 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
 		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 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
 		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 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
 				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 @@ static int retrydial_exec(struct ast_channel *chan, void *data)
 	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;
 	}	
diff --git a/apps/app_dictate.c b/apps/app_dictate.c
index bf17432d2f4b6449e61efbc215b3d8a86adc3f6f..0df5a5604143178e296789b8584ffbc2ca737bef 100755
--- a/apps/app_dictate.c
+++ b/apps/app_dictate.c
@@ -101,7 +101,7 @@ static int dictate_exec(struct ast_channel *chan, void *data)
 	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]));
 	}
 	
diff --git a/apps/app_directed_pickup.c b/apps/app_directed_pickup.c
index 7be20881f0dddf22ac8163eff3a9980602db3804..84f350746372473acd0fe9160c637cda7fca145f 100755
--- a/apps/app_directed_pickup.c
+++ b/apps/app_directed_pickup.c
@@ -57,7 +57,7 @@ static int pickup_exec(struct ast_channel *chan, void *data)
 	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;	
 	}
diff --git a/apps/app_directory.c b/apps/app_directory.c
index fd31be96589260738dcb66dbefde93e987e7775d..8c54d74cce43b016bb1544470e113ec07727fc46 100755
--- a/apps/app_directory.c
+++ b/apps/app_directory.c
@@ -293,7 +293,7 @@ static int do_directory(struct ast_channel *chan, struct ast_config *cfg, char *
 	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 @@ static int directory_exec(struct ast_channel *chan, void *data)
 	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 @@ static int directory_exec(struct ast_channel *chan, void *data)
 	}
 
 	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
diff --git a/apps/app_disa.c b/apps/app_disa.c
index 8075911f8e951bad7c59894561914286176c7ec7..6e52b0ddeb6127c3f143d4724447febfb0fcd3fe 100755
--- a/apps/app_disa.c
+++ b/apps/app_disa.c
@@ -126,7 +126,7 @@ static int disa_exec(struct ast_channel *chan, void *data)
 	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;
 	}
diff --git a/apps/app_dumpchan.c b/apps/app_dumpchan.c
index 65e8f1d2082930aa6e7d32c60c6368160e4c8b66..2375f2261fefd03563f7c10ad013d60df7f981ea 100755
--- a/apps/app_dumpchan.c
+++ b/apps/app_dumpchan.c
@@ -141,7 +141,7 @@ static int dumpchan_exec(struct ast_channel *chan, void *data)
 	
 	LOCAL_USER_ADD(u);
 
-	if (data && !ast_strlen_zero(data)) {
+	if (!ast_strlen_zero(data)) {
 		level = atoi(data);
 	}
 
diff --git a/apps/app_enumlookup.c b/apps/app_enumlookup.c
index c87d7a1fc5e4771320886d5b2854a36e953261c6..0c3fca6dece38130760eabe800cb5117a955386b 100755
--- a/apps/app_enumlookup.c
+++ b/apps/app_enumlookup.c
@@ -85,7 +85,7 @@ static int enumlookup_exec(struct ast_channel *chan, void *data)
 	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;
 	}
diff --git a/apps/app_externalivr.c b/apps/app_externalivr.c
index 6630662b509f5ed858b926c2afe72b4943184d8f..f6dbc9c9f0391a6977ce6978368e8a785f1a3b4d 100755
--- a/apps/app_externalivr.c
+++ b/apps/app_externalivr.c
@@ -262,7 +262,7 @@ static int app_exec(struct ast_channel *chan, void *data)
 	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;
 	}
diff --git a/apps/app_festival.c b/apps/app_festival.c
index d644a87722ae86b895ddcc8cd2933ff5fad76713..539d245bb64995bf5d226250614d7d370cec915e 100755
--- a/apps/app_festival.c
+++ b/apps/app_festival.c
@@ -296,7 +296,7 @@ static int festival_exec(struct ast_channel *chan, void *vdata)
 	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;
 	}
diff --git a/apps/app_forkcdr.c b/apps/app_forkcdr.c
index 9ff84b257d25f9241873d78052f166979f260e46..6ccaab4156beea44cf28a2b4ebc8aa262ac6eec4 100755
--- a/apps/app_forkcdr.c
+++ b/apps/app_forkcdr.c
@@ -74,7 +74,7 @@ static int forkcdr_exec(struct ast_channel *chan, void *data)
 	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);
diff --git a/apps/app_groupcount.c b/apps/app_groupcount.c
index 6ddb20f657344bd14fe8b2d962b86f003d98a78c..8d7479c153248055a0f885603764ecefedbd111b 100755
--- a/apps/app_groupcount.c
+++ b/apps/app_groupcount.c
@@ -145,7 +145,7 @@ static int group_check_exec(struct ast_channel *chan, void *data)
 		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;
 	}
diff --git a/apps/app_hasnewvoicemail.c b/apps/app_hasnewvoicemail.c
index 47f9a4256ca999023f1110a04dd782e92a95d9fa..bdf3014cb772f2f534016f13a48ed946b63da708 100755
--- a/apps/app_hasnewvoicemail.c
+++ b/apps/app_hasnewvoicemail.c
@@ -115,13 +115,13 @@ static int hasvoicemail_exec(struct ast_channel *chan, void *data)
 
 	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;
diff --git a/apps/app_ices.c b/apps/app_ices.c
index f7a2b014c1cf7aca122b236687f3ad9aae4ff875..1bc4b8cedfc96223e1b361663d73bc81df18a10a 100755
--- a/apps/app_ices.c
+++ b/apps/app_ices.c
@@ -101,7 +101,7 @@ static int ices_exec(struct ast_channel *chan, void *data)
 	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;
 	}
diff --git a/apps/app_image.c b/apps/app_image.c
index 21a98d8dab8aa420b98b0250d78f8d00a34c5818..0e43e2a3e09ca14e1ed8a21f8ffd49f6db1a14a9 100755
--- a/apps/app_image.c
+++ b/apps/app_image.c
@@ -61,7 +61,7 @@ static int sendimage_exec(struct ast_channel *chan, void *data)
 	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;
 	}
diff --git a/apps/app_ivrdemo.c b/apps/app_ivrdemo.c
index c91fde4a57bc8bb8b1876e814f0adb3aae1889e1..16cf45718a346e38cad1db251b1c6f7ed70047cf 100755
--- a/apps/app_ivrdemo.c
+++ b/apps/app_ivrdemo.c
@@ -89,7 +89,7 @@ static int skel_exec(struct ast_channel *chan, void *data)
 	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;
 	}
diff --git a/apps/app_macro.c b/apps/app_macro.c
index 2100f03f9f8030181851ad52ebc50003c4782f89..42e0c7801eabfd03d647549446fe4a65768d6d24 100755
--- a/apps/app_macro.c
+++ b/apps/app_macro.c
@@ -111,7 +111,7 @@ static int macro_exec(struct ast_channel *chan, void *data)
 	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 @@ static int macro_exec(struct ast_channel *chan, void *data)
 	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;
diff --git a/apps/app_math.c b/apps/app_math.c
index dd8f3bb866be2692142a27f24c2b6ef8a66e834d..f74e1efee53506dd02bbde00b84fb970fa1d5e28 100755
--- a/apps/app_math.c
+++ b/apps/app_math.c
@@ -108,7 +108,7 @@ static int math_exec(struct ast_channel *chan, void *data)
 		deprecation_warning = 1;
 	}
 
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "No parameters passed. !\n");
 		return -1;
 	}
diff --git a/apps/app_md5.c b/apps/app_md5.c
index 648ac1bd3696ff792557a6f7ce9de21b1aada5da..d30f3c21651fdadacaa6066066c8af7fcb8c86da 100755
--- a/apps/app_md5.c
+++ b/apps/app_md5.c
@@ -73,7 +73,7 @@ static int md5_exec(struct ast_channel *chan, void *data)
 		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 @@ static int md5check_exec(struct ast_channel *chan, void *data)
 		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;
 	}
diff --git a/apps/app_meetme.c b/apps/app_meetme.c
index e980bbd3953dfaa831ec0343287d592b243a3256..9350566b7a77ae19b34ed8f615241f889d5a6646 100755
--- a/apps/app_meetme.c
+++ b/apps/app_meetme.c
@@ -1663,7 +1663,7 @@ static int count_exec(struct ast_channel *chan, void *data)
 	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 @@ static int count_exec(struct ast_channel *chan, void *data)
 	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 @@ static int conf_exec(struct ast_channel *chan, void *data)
 
 	LOCAL_USER_ADD(u);
 
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		allowretry = 1;
 		notdata = "";
 	} else {
@@ -1972,7 +1972,7 @@ static int admin_exec(struct ast_channel *chan, void *data) {
 
 	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, "|");
diff --git a/apps/app_mixmonitor.c b/apps/app_mixmonitor.c
index 419e951fc3c32568d0501ef7026e880a152465ba..ab80458352bac134a16ac23f340dd9bbd454d2bc 100755
--- a/apps/app_mixmonitor.c
+++ b/apps/app_mixmonitor.c
@@ -385,7 +385,7 @@ static int muxmon_exec(struct ast_channel *chan, void *data)
 		*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 @@ static int muxmon_exec(struct ast_channel *chan, void *data)
 		}
 	}
 	
-	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;
diff --git a/apps/app_mp3.c b/apps/app_mp3.c
index 2c0334042b0b5fe19b5342fe0e7203baeb28c899..51844fa25d15bfc623ff1f3088ddf96d85d9f2f9 100755
--- a/apps/app_mp3.c
+++ b/apps/app_mp3.c
@@ -128,7 +128,7 @@ static int mp3_exec(struct ast_channel *chan, void *data)
 		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;
 	}
diff --git a/apps/app_muxmon.c b/apps/app_muxmon.c
index 419e951fc3c32568d0501ef7026e880a152465ba..ab80458352bac134a16ac23f340dd9bbd454d2bc 100755
--- a/apps/app_muxmon.c
+++ b/apps/app_muxmon.c
@@ -385,7 +385,7 @@ static int muxmon_exec(struct ast_channel *chan, void *data)
 		*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 @@ static int muxmon_exec(struct ast_channel *chan, void *data)
 		}
 	}
 	
-	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;
diff --git a/apps/app_osplookup.c b/apps/app_osplookup.c
index 6a0bc6aec052a7c12716bd6c4033116699dfe145..4cb8f2b04e87429e0a6b54abdc4240c744882d1c 100755
--- a/apps/app_osplookup.c
+++ b/apps/app_osplookup.c
@@ -110,7 +110,7 @@ static int osplookup_exec(struct ast_channel *chan, void *data)
 	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 @@ static int ospnext_exec(struct ast_channel *chan, void *data)
 	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 @@ static int ospnext_exec(struct ast_channel *chan, void *data)
 	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 @@ static int ospfinished_exec(struct ast_channel *chan, void *data)
 	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 @@ static int ospfinished_exec(struct ast_channel *chan, void *data)
 	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;
diff --git a/apps/app_page.c b/apps/app_page.c
index 8db0356e6401047bb2c9efa217f3df90120b3dc4..921316d812fb045fa1aa6e562f39c694be4a7d6a 100755
--- a/apps/app_page.c
+++ b/apps/app_page.c
@@ -120,7 +120,7 @@ static int page_exec(struct ast_channel *chan, void *data)
 	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;
 	}
diff --git a/apps/app_parkandannounce.c b/apps/app_parkandannounce.c
index 109226a343a98afbb0fc338db661b9b54731d4ba..6c9650fdb0c65e4d9b66f5102465da9c1230ed70 100755
--- a/apps/app_parkandannounce.c
+++ b/apps/app_parkandannounce.c
@@ -81,7 +81,7 @@ static int parkandannounce_exec(struct ast_channel *chan, void *data)
 
 	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;
 	}
diff --git a/apps/app_playback.c b/apps/app_playback.c
index 1e858b0a1eb513810259dadf3c70995b1bc20917..5808197c49e390745f624507931cad7210089b5a 100755
--- a/apps/app_playback.c
+++ b/apps/app_playback.c
@@ -70,7 +70,7 @@ static int playback_exec(struct ast_channel *chan, void *data)
 	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;
 	}
diff --git a/apps/app_privacy.c b/apps/app_privacy.c
index 44de165cee80fd6c4a92b09b0a69bbc8b39f8185..d0b2e44cd4357358fd8e92dc65d43301eeef27ab 100755
--- a/apps/app_privacy.c
+++ b/apps/app_privacy.c
@@ -85,7 +85,7 @@ privacy_exec (struct ast_channel *chan, void *data)
 	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 {
diff --git a/apps/app_queue.c b/apps/app_queue.c
index a98612cc44652169aaa379ee0b3642b10ed782d0..daa5432356662ac55c64198b7dc5ce666a234ce3 100755
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -2554,7 +2554,7 @@ static int pqm_exec(struct ast_channel *chan, void *data)
 	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 @@ static int upqm_exec(struct ast_channel *chan, void *data)
 	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 @@ static int rqm_exec(struct ast_channel *chan, void *data)
 	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 @@ static int aqm_exec(struct ast_channel *chan, void *data)
 	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 @@ static int aqm_exec(struct ast_channel *chan, void *data)
 				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 @@ static int queue_exec(struct ast_channel *chan, void *data)
 	/* 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 @@ static char *queue_function_qac(struct ast_channel *chan, char *cmd, char *data,
 
 	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;
diff --git a/apps/app_random.c b/apps/app_random.c
index 5f2c6cd871573e63f0e54a7b39013d9c3d8d73ce..08e1d188ad45cf15ae2de04ffcc975340a460b90 100755
--- a/apps/app_random.c
+++ b/apps/app_random.c
@@ -63,7 +63,7 @@ static int random_exec(struct ast_channel *chan, void *data)
 	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;
 	}
diff --git a/apps/app_read.c b/apps/app_read.c
index ecf472e595fc97526f08f627c183ab1d028f7ae3..0c4e2872b7466acddc64f7b6ed928c39a75c761b 100755
--- a/apps/app_read.c
+++ b/apps/app_read.c
@@ -89,7 +89,7 @@ static int read_exec(struct ast_channel *chan, void *data)
 	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 @@ static int read_exec(struct ast_channel *chan, void *data)
 			to *= 1000;
 	}
 
-	if (!(filename) || ast_strlen_zero(filename)) 
+	if (ast_strlen_zero(filename)) 
 		filename = NULL;
 	if (maxdigitstr) {
 		maxdigits = atoi(maxdigitstr);
@@ -152,7 +152,7 @@ static int read_exec(struct ast_channel *chan, void *data)
 		} 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;
diff --git a/apps/app_readfile.c b/apps/app_readfile.c
index 07d30ed78a2c7e4f458edf4f8875b13ac9ec50c1..4012bc6a2e9d51e407296aebcd6754b22f992fe3 100755
--- a/apps/app_readfile.c
+++ b/apps/app_readfile.c
@@ -63,7 +63,7 @@ static int readfile_exec(struct ast_channel *chan, void *data)
 	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;
 	}
diff --git a/apps/app_realtime.c b/apps/app_realtime.c
index ff7396520d5602074440557d3b509863b5f1f4aa..b0a810a8ae2833a2ddf84ecd6636fa532158f574 100755
--- a/apps/app_realtime.c
+++ b/apps/app_realtime.c
@@ -130,7 +130,7 @@ static int realtime_update_exec(struct ast_channel *chan, void *data)
 	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 @@ static int realtime_exec(struct ast_channel *chan, void *data)
 	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;
 	}
diff --git a/apps/app_record.c b/apps/app_record.c
index 90def26f2733754c11c4c30762bb62e0b6126e1e..38fadf00119210f5487429a8ed34ef8dfe47f4c6 100755
--- a/apps/app_record.c
+++ b/apps/app_record.c
@@ -100,7 +100,7 @@ static int record_exec(struct ast_channel *chan, void *data)
 	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;
 	}
diff --git a/apps/app_rpt.c b/apps/app_rpt.c
index 9f53a3153c3e8e8fc0a0c6148bd2f272f16cacdd..377a99578e1287d9129ca9546937bf3f0c7e7fa3 100755
--- a/apps/app_rpt.c
+++ b/apps/app_rpt.c
@@ -5839,7 +5839,7 @@ static int rpt_exec(struct ast_channel *chan, void *data)
 	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;
 	}
diff --git a/apps/app_senddtmf.c b/apps/app_senddtmf.c
index 4625e3b44916ad359ec013f1952753581e8c104c..f9493f71664baea4724cab7d926bf99156c8b966 100755
--- a/apps/app_senddtmf.c
+++ b/apps/app_senddtmf.c
@@ -62,7 +62,7 @@ static int senddtmf_exec(struct ast_channel *chan, void *data)
 	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;
 	}
diff --git a/apps/app_sendtext.c b/apps/app_sendtext.c
index 917b8d71d6ec73067dd808a8a754b67404b90b95..7bdf1d2651c0febdb6b66b1a6e8570ddb265f4e5 100755
--- a/apps/app_sendtext.c
+++ b/apps/app_sendtext.c
@@ -71,7 +71,7 @@ static int sendtext_exec(struct ast_channel *chan, void *data)
 	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;
 	}
diff --git a/apps/app_setcallerid.c b/apps/app_setcallerid.c
index 36b11f9c1c41e74493fd02c4dee69fd693cca91a..18343b78632f825b7b8ec61fad2c46e843981127 100755
--- a/apps/app_setcallerid.c
+++ b/apps/app_setcallerid.c
@@ -106,7 +106,7 @@ static int setcallerid_exec(struct ast_channel *chan, void *data)
 	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;
 	}
diff --git a/apps/app_setcidname.c b/apps/app_setcidname.c
index 240b121dca27976bbff038163b8090a9db8b76cc..2dab53812ad5e4bac07db4d82d3f9a3ca6a0bc19 100755
--- a/apps/app_setcidname.c
+++ b/apps/app_setcidname.c
@@ -70,7 +70,7 @@ static int setcallerid_exec(struct ast_channel *chan, void *data)
 		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;	
 	}
diff --git a/apps/app_skel.c b/apps/app_skel.c
index 89953b440ffcd4c26c0293521d2a31768569adeb..f391cb64ba3cec8091b5a4716bc8b947fbf7c8fb 100755
--- a/apps/app_skel.c
+++ b/apps/app_skel.c
@@ -72,7 +72,7 @@ static int app_exec(struct ast_channel *chan, void *data)
 	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 @@ static int app_exec(struct ast_channel *chan, void *data)
 		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))
diff --git a/apps/app_softhangup.c b/apps/app_softhangup.c
index d64530f7f6722de8a818f20cfa84f20d7d703fd2..66c7c412bab2071d778911ca4d0de5ec0f052ace 100755
--- a/apps/app_softhangup.c
+++ b/apps/app_softhangup.c
@@ -61,7 +61,7 @@ static int softhangup_exec(struct ast_channel *chan, void *data)
 	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;
 	}
diff --git a/apps/app_sql_postgres.c b/apps/app_sql_postgres.c
index d2b666a4f24a19f5bb5458e8a852ecd65a2a543d..65a0f14d2abda599210a1ef52874b7be13be196d 100755
--- a/apps/app_sql_postgres.c
+++ b/apps/app_sql_postgres.c
@@ -504,7 +504,7 @@ static int PGSQL_exec(struct ast_channel *chan, void *data)
 	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;
 	}
diff --git a/apps/app_system.c b/apps/app_system.c
index f1e38a3ebbf3f8ed4e3b1a508600fb92d297c871..76593f60f87e8d41af064d138cfc1b96bb39608b 100755
--- a/apps/app_system.c
+++ b/apps/app_system.c
@@ -90,7 +90,7 @@ static int system_exec_helper(struct ast_channel *chan, void *data, int failmode
 	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;
diff --git a/apps/app_talkdetect.c b/apps/app_talkdetect.c
index e0963e5578f3d46bc13566a90c139737d1c3dd8c..207d46e55220c20530419d0ed19f8f9f3c3ae959 100755
--- a/apps/app_talkdetect.c
+++ b/apps/app_talkdetect.c
@@ -78,7 +78,7 @@ static int background_detect_exec(struct ast_channel *chan, void *data)
 	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;
 	}
diff --git a/apps/app_test.c b/apps/app_test.c
index cbcb05a040d7f8e36811aa743de92c6c64eb731d..8a3c8c22ab158054dc98852bc557478192249159 100755
--- a/apps/app_test.c
+++ b/apps/app_test.c
@@ -137,7 +137,7 @@ static int testclient_exec(struct ast_channel *chan, void *data)
 	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;
 	}
diff --git a/apps/app_transfer.c b/apps/app_transfer.c
index 0333b4d1abbdb7db702dac3912d6c5d23f5e4a91..4b4fb1c5d56c569d7cace02cc40f82e4f5679af4 100755
--- a/apps/app_transfer.c
+++ b/apps/app_transfer.c
@@ -75,7 +75,7 @@ static int transfer_exec(struct ast_channel *chan, void *data)
 	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;
diff --git a/apps/app_txtcidname.c b/apps/app_txtcidname.c
index bf39da38bafc681b1142348639ec5e5d920a7f72..18aa0cba93e5dc8fafb68be33e6b1b72a4d5f540 100755
--- a/apps/app_txtcidname.c
+++ b/apps/app_txtcidname.c
@@ -71,7 +71,7 @@ static int txtcidname_exec(struct ast_channel *chan, void *data)
 		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;
 	}
diff --git a/apps/app_url.c b/apps/app_url.c
index 4e1cc011e57d660fbfc614cfb9dadb4262f411c7..d9451dba561dd949383d3afa1003c9b9207a20ea 100755
--- a/apps/app_url.c
+++ b/apps/app_url.c
@@ -81,7 +81,7 @@ static int sendurl_exec(struct ast_channel *chan, void *data)
 	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;
diff --git a/apps/app_userevent.c b/apps/app_userevent.c
index 5092e94e25bb2ba5abc9252f3014a5e9d37369a5..8fc8fcdba0e93d01760a5eb9456ec4f3022d9d8d 100755
--- a/apps/app_userevent.c
+++ b/apps/app_userevent.c
@@ -66,7 +66,7 @@ static int userevent_exec(struct ast_channel *chan, void *data)
 	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;
 	}
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 56002c734ba470de1f8bcd330822b771494b2b94..174d17864c4119cfdceaa485e284f30a28de7c11 100755
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -2973,7 +2973,7 @@ static void adsi_message(struct ast_channel *chan, struct vm_state *vms)
 				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 @@ static int play_message_category(struct ast_channel *chan, char *category)
 {
 	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 @@ static int vm_authenticate(struct ast_channel *chan, char *mailbox, int mailbox_
 		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 @@ static int vm_authenticate(struct ast_channel *chan, char *mailbox, int mailbox_
 		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 @@ static int vm_execmain(struct ast_channel *chan, void *data)
 	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 @@ static int vm_execmain(struct ast_channel *chan, void *data)
 	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 @@ static int vm_exec(struct ast_channel *chan, void *data)
 	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 @@ static int vm_box_exists(struct ast_channel *chan, void *data)
 	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 @@ static int load_config(void)
 			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++;
diff --git a/apps/app_while.c b/apps/app_while.c
index 8619294f41ee9808f51aa15b4ae515f89f229856..5436cd3c9a01943e72dbb8fc3b01adbdef493a9e 100755
--- a/apps/app_while.c
+++ b/apps/app_while.c
@@ -249,7 +249,7 @@ static int _while_exec(struct ast_channel *chan, void *data, int end)
 	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))) {
diff --git a/apps/app_zapateller.c b/apps/app_zapateller.c
index 0f764ee8d234ca14f63b49cdc728daf314363b40..9d3ab12097a4dca907a9813cdfd01ebdd13cef76 100755
--- a/apps/app_zapateller.c
+++ b/apps/app_zapateller.c
@@ -68,7 +68,7 @@ static int zapateller_exec(struct ast_channel *chan, void *data)
 
 	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"))
diff --git a/apps/app_zapbarge.c b/apps/app_zapbarge.c
index b608d9c153848904aa951c930f3dd9de845e82b3..d9404a4a8fba41f7a104ebf6a0f0b1e54467eaba 100755
--- a/apps/app_zapbarge.c
+++ b/apps/app_zapbarge.c
@@ -269,7 +269,7 @@ static int conf_exec(struct ast_channel *chan, void *data)
 
 	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);