diff --git a/ChangeLog b/ChangeLog
index 6ca8f4e9199b96fe25fc1a95d873b10801f27662..e9d72159507a0847c7d0bbe37f45dc3d22eba488 100755
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2005-11-07  Kevin P. Fleming  <kpfleming@digium.com>
 
+	* many files: don't check for NULL before calling ast_strlen_zero, it can do it itself (issue #5648)
+
 	* pbx.c (handle_show_hints): use proper state-to-string function for hint state (issue #5583)
 
 	* rtp.c: use unsigned format for debug packet output (issue #5595)
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 7fcffd71c183ded81bff866bb71bc0f58b701240..ae622f05a232b05f873dc4b540f5c1191b078649 100755
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -2022,7 +2022,7 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce
 	cur = qe->parent->members;
 	if (!ast_strlen_zero(qe->announce))
 		announce = qe->announce;
-	if (announceoverride && !ast_strlen_zero(announceoverride))
+	if (!ast_strlen_zero(announceoverride))
 		announce = announceoverride;
 
 	while(cur) {
@@ -2201,7 +2201,7 @@ static int try_calling(struct queue_ent *qe, const char *options, char *announce
 		}
 		/* Drop out of the queue at this point, to prepare for next caller */
 		leave_queue(qe);			
- 		if (url && !ast_strlen_zero(url) && ast_channel_supports_html(peer)) {
+ 		if (!ast_strlen_zero(url) && ast_channel_supports_html(peer)) {
 			if (option_debug)
 	 			ast_log(LOG_DEBUG, "app_queue: sendurl=%s.\n", url);
  			ast_channel_sendurl(peer, url);
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index c6c6f8ae7a43efd86830ae32f2093bd5a122ed00..f12b3b8a8c38ad9406d26933447bb4487d3d90ca 100755
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -3658,7 +3658,7 @@ static int play_message_callerid(struct ast_channel *chan, struct vm_state *vms,
 	/* Strip off caller ID number from name */
 	ast_log(LOG_DEBUG, "VM-CID: composite caller ID received: %s, context: %s\n", cid, context);
 	ast_callerid_parse(cid, &name, &callerid);
-	if ((callerid != NULL)&&(!res)&&(!ast_strlen_zero(callerid))){
+	if ((!res)&&(!ast_strlen_zero(callerid))){
 		/* Check for internal contexts and only */
 		/* say extension when the call didn't come from an internal context in the list */
 		for (i = 0 ; i < MAX_NUM_CID_CONTEXTS ; i++){
diff --git a/apps/app_zapscan.c b/apps/app_zapscan.c
index f016cb5143cfaa7f3edd5dc7c0f47a4aae35c202..a199d4e02137f60e31cbd5a3d8322bbd4423c2cd 100755
--- a/apps/app_zapscan.c
+++ b/apps/app_zapscan.c
@@ -305,7 +305,8 @@ static int conf_exec(struct ast_channel *chan, void *data)
 	if (chan->_state != AST_STATE_UP)
 		ast_answer(chan);
 	
-	if((desired_group = ast_strdupa((char *) data)) && !ast_strlen_zero(desired_group)) {
+	desired_group = ast_strdupa((char *) data);
+	if(!ast_strlen_zero(desired_group)) {
 		ast_verbose(VERBOSE_PREFIX_3 "Scanning for group %s\n", desired_group);
 		search_group = 1;
 	}
diff --git a/channels/chan_misdn.c b/channels/chan_misdn.c
index 6496dea71f81af743ceb25dcb8e82209d10f9f9e..09cd875132e71715b14c49fc5f1c978b081e0f92 100755
--- a/channels/chan_misdn.c
+++ b/channels/chan_misdn.c
@@ -3466,7 +3466,7 @@ static int misdn_facility_exec(struct ast_channel *chan, void *data)
 		return -1;
 	}
 	
-	if (!data || ast_strlen_zero((char *)data)) {
+	if (ast_strlen_zero((char *)data)) {
 		ast_log(LOG_WARNING, "misdn_facility Requires arguments\n");
 		return -1;
 	}
@@ -3509,7 +3509,7 @@ static int misdn_set_opt_exec(struct ast_channel *chan, void *data)
 		return -1;
 	}
 	
-	if (!data || ast_strlen_zero((char *)data)) {
+	if (ast_strlen_zero((char *)data)) {
 		ast_log(LOG_WARNING, "misdn_set_opt Requires arguments\n");
 		return -1;
 	}
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 7985d0633e509d9e3c94d62b882e7a8890a16497..29fdfa23a9ce6a1c7f8f866f92809491c3099e3d 100755
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -4845,14 +4845,14 @@ static int transmit_invite(struct sip_pvt *p, int sipmethod, int sdp, int init)
 			add_header(&req, "Referred-By", p->referred_by);
 	}
 #ifdef OSP_SUPPORT
-	if (p->options && p->options->osptoken && !ast_strlen_zero(p->options->osptoken)) {
+	if (p->options && !ast_strlen_zero(p->options->osptoken)) {
 		ast_log(LOG_DEBUG,"Adding OSP Token: %s\n", p->options->osptoken);
 		add_header(&req, "P-OSP-Auth-Token", p->options->osptoken);
 	} else {
 		ast_log(LOG_DEBUG,"NOT Adding OSP Token\n");
 	}
 #endif
-	if (p->options && p->options->distinctive_ring && !ast_strlen_zero(p->options->distinctive_ring))
+	if (p->options && !ast_strlen_zero(p->options->distinctive_ring))
 	{
 		add_header(&req, "Alert-Info", p->options->distinctive_ring);
 	}
diff --git a/funcs/func_cdr.c b/funcs/func_cdr.c
index 66bef4551016768e96d833390636b7294de1f1df..3e4696e18df6fa17c91a8b1d8a50fa3b383883e2 100755
--- a/funcs/func_cdr.c
+++ b/funcs/func_cdr.c
@@ -45,7 +45,7 @@ static char *builtin_function_cdr_read(struct ast_channel *chan, char *cmd, char
 	char *argv[2];
 	int recursive = 0;
 
-	if (!data || ast_strlen_zero(data))
+	if (ast_strlen_zero(data))
 		return NULL;
 	
 	if (!chan->cdr)
@@ -73,7 +73,7 @@ static void builtin_function_cdr_write(struct ast_channel *chan, char *cmd, char
 	char *argv[2];
 	int recursive = 0;
 
-	if (!data || ast_strlen_zero(data) || !value)
+	if (ast_strlen_zero(data) || !value)
 		return;
 	
 	mydata = ast_strdupa(data);
diff --git a/funcs/func_db.c b/funcs/func_db.c
index a01af59c12fc2ddc8dc04a145cd97da46292fbcb..bc135a6b33ad42c98943889e58008cb2e6a08cd1 100755
--- a/funcs/func_db.c
+++ b/funcs/func_db.c
@@ -49,7 +49,7 @@ static char *function_db_read(struct ast_channel *chan, char *cmd, char *data, c
 	char *family;
 	char *key;
 
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "DB requires an argument, DB(<family>/<key>)\n");
 		return buf;
 	}
@@ -82,7 +82,7 @@ static void function_db_write(struct ast_channel *chan, char *cmd, char *data, c
 	char *family;
 	char *key;
 
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "DB requires an argument, DB(<family>/<key>)=<value>\n");
 		return;
 	}
@@ -128,7 +128,7 @@ static char *function_db_exists(struct ast_channel *chan, char *cmd, char *data,
 	char *family;
 	char *key;
 
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "DB_EXISTS requires an argument, DB(<family>/<key>)\n");
 		return buf;
 	}
diff --git a/funcs/func_enum.c b/funcs/func_enum.c
index 2d5d2196256dea61862d48941ef18ac43afa5b6b..8034be87833ccb241955a43d2af6498ab9ae4d3f 100755
--- a/funcs/func_enum.c
+++ b/funcs/func_enum.c
@@ -64,7 +64,7 @@ static char *function_enum(struct ast_channel *chan, char *cmd, char *data, char
        int i = 0;
 
 
-       if (!data || ast_strlen_zero(data)) {
+       if (ast_strlen_zero(data)) {
                ast_log(LOG_WARNING, synopsis);
                return "";
        }
@@ -166,7 +166,7 @@ static char *function_txtcidname(struct ast_channel *chan, char *cmd, char *data
 
 	buf[0] = '\0';
 
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "TXTCIDNAME requires an argument (number)\n");
 		LOCAL_USER_REMOVE(u);
 		return buf;	
diff --git a/funcs/func_env.c b/funcs/func_env.c
index 424f7cf0d2e4c894dba269ebca1c7aed7c523a01..4906c7d112cd95e99a82edd600d9e07407390c90 100755
--- a/funcs/func_env.c
+++ b/funcs/func_env.c
@@ -50,8 +50,8 @@ static char *builtin_function_env_read(struct ast_channel *chan, char *cmd, char
 
 static void builtin_function_env_write(struct ast_channel *chan, char *cmd, char *data, const char *value) 
 {
-	if (data && !ast_strlen_zero(data)) {
-		if (value && !ast_strlen_zero(value)) {
+	if (!ast_strlen_zero(data)) {
+		if (!ast_strlen_zero(value)) {
 			setenv(data, value, 1);
 		} else {
 			unsetenv(data);
diff --git a/funcs/func_groupcount.c b/funcs/func_groupcount.c
index 0559aae295af0fcd51ab3ad9468f8474ecdab7b7..29742298504a64d73f092ff8f405d372a64e2590 100755
--- a/funcs/func_groupcount.c
+++ b/funcs/func_groupcount.c
@@ -102,7 +102,7 @@ static char *group_function_read(struct ast_channel *chan, char *cmd, char *data
 	char varname[256];
 	char *group;
 
-	if (data && !ast_strlen_zero(data)) {
+	if (!ast_strlen_zero(data)) {
 		snprintf(varname, sizeof(varname), "%s_%s", GROUP_CATEGORY_PREFIX, data);
 	} else {
 		ast_copy_string(varname, GROUP_CATEGORY_PREFIX, sizeof(varname));
@@ -119,7 +119,7 @@ static void group_function_write(struct ast_channel *chan, char *cmd, char *data
 {
 	char grpcat[256];
 
-	if (data && !ast_strlen_zero(data)) {
+	if (!ast_strlen_zero(data)) {
 		snprintf(grpcat, sizeof(grpcat), "%s@%s", value, data);
 	} else {
 		ast_copy_string(grpcat, value, sizeof(grpcat));
diff --git a/funcs/func_logic.c b/funcs/func_logic.c
index a195eca4384d1f1e8c90585fa658d31c9f504201..f748ba93906e0677ebd9b836dad1483b5d2b8b06 100755
--- a/funcs/func_logic.c
+++ b/funcs/func_logic.c
@@ -64,7 +64,7 @@ static char *builtin_function_iftime(struct ast_channel *chan, char *cmd, char *
 	iftrue = strsep(&data, ":");
 	iffalse = data;
 
-	if (!expr || ast_strlen_zero(expr) || !(iftrue || iffalse)) {
+	if (ast_strlen_zero(expr) || !(iftrue || iffalse)) {
 		ast_log(LOG_WARNING, "Syntax IFTIME(<timespec>?[<true>][:<false>])\n");
 		return NULL;
 	}
@@ -104,7 +104,7 @@ static char *builtin_function_if(struct ast_channel *chan, char *cmd, char *data
 	iftrue = strsep(&data, ":");
 	iffalse = data;
 
-	if (!expr || ast_strlen_zero(expr) || !(iftrue || iffalse)) {
+	if (ast_strlen_zero(expr) || !(iftrue || iffalse)) {
 		ast_log(LOG_WARNING, "Syntax IF(<expr>?[<true>][:<false>])\n");
 		return NULL;
 	}
@@ -136,7 +136,7 @@ static char *builtin_function_set(struct ast_channel *chan, char *cmd, char *dat
 	varname = strsep(&data, "=");
 	val = data;
 
-	if (!varname || ast_strlen_zero(varname) || !val) {
+	if (ast_strlen_zero(varname) || !val) {
 		ast_log(LOG_WARNING, "Syntax SET(<varname>=[<value>])\n");
 		return NULL;
 	}
diff --git a/funcs/func_math.c b/funcs/func_math.c
index 46085275d5cca84ea55d48c08eb41334903ceb45..e53eb40237abcd84e3c4f1f0a8f3f0d63526a09c 100755
--- a/funcs/func_math.c
+++ b/funcs/func_math.c
@@ -78,7 +78,7 @@ static char *builtin_function_math(struct ast_channel *chan, char *cmd, char *da
 
 	char *mvalue1, *mvalue2=NULL, *mtype_of_result;
 		
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "Syntax: Math(<number1><op><number 2>[,<type_of_result>]) - missing argument!\n");
 		return NULL;
 	}
diff --git a/funcs/func_md5.c b/funcs/func_md5.c
index fed75722c3c790808ab0a3e679498f29483f27fe..910e44260664e2d3982bb641021d3672e9f2eb9c 100755
--- a/funcs/func_md5.c
+++ b/funcs/func_md5.c
@@ -40,7 +40,7 @@ static char *builtin_function_md5(struct ast_channel *chan, char *cmd, char *dat
 {
 	char md5[33];
 
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "Syntax: MD5(<data>) - missing argument!\n");
 		return NULL;
 	}
diff --git a/funcs/func_strings.c b/funcs/func_strings.c
index d527e8256ecbe96a6f24193c5e7c4ccfd219c679..ab9474d9bcd2cfe9959f9f6e1b0782fd1a8fa736 100755
--- a/funcs/func_strings.c
+++ b/funcs/func_strings.c
@@ -160,7 +160,7 @@ static char *acf_strftime(struct ast_channel *chan, char *cmd, char *data, char
 	epoch = strsep(&format, "|");
 	timezone = strsep(&format, "|");
 
-	if (!epoch || ast_strlen_zero(epoch) || !sscanf(epoch, "%ld", &epochi)) {
+	if (ast_strlen_zero(epoch) || !sscanf(epoch, "%ld", &epochi)) {
 		struct timeval tv = ast_tvnow();
 		epochi = tv.tv_sec;
 	}
@@ -193,7 +193,7 @@ static char *function_eval(struct ast_channel *chan, char *cmd, char *data, char
 {
 	memset(buf, 0, len);
 
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "EVAL requires an argument: EVAL(<string>)\n");
 		return buf;
 	}
diff --git a/funcs/func_uri.c b/funcs/func_uri.c
index bd1fee4f5aee582b1d1d0378be5737237037220e..f75023c5ff4126a1a20aa8379a548179ecc84647 100755
--- a/funcs/func_uri.c
+++ b/funcs/func_uri.c
@@ -45,7 +45,7 @@ static char *builtin_function_uriencode(struct ast_channel *chan, char *cmd, cha
 {
 	char uri[BUFSIZ];
 
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "Syntax: URIENCODE(<data>) - missing argument!\n");
 		return NULL;
 	}
@@ -59,7 +59,7 @@ static char *builtin_function_uriencode(struct ast_channel *chan, char *cmd, cha
 /*!\brief builtin_function_uridecode: Decode URI according to RFC 2396 */
 static char *builtin_function_uridecode(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len) 
 {
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "Syntax: URIDECODE(<data>) - missing argument!\n");
 		return NULL;
 	}
diff --git a/pbx/pbx_ael.c b/pbx/pbx_ael.c
index ce2d85851e76f3287338baa56b11a5ff790655f6..9350ff49b2cdcc0fccd58accb65708bc248913c4 100755
--- a/pbx/pbx_ael.c
+++ b/pbx/pbx_ael.c
@@ -496,7 +496,7 @@ static int __build_step(const char *what, const char *name, const char *filename
 		data = c;
 		data = ast_skip_blanks(data);
 	}
-	if (!data || ast_strlen_zero(data))
+	if (ast_strlen_zero(data))
 		return 0;
 	if (matches_keyword(data, "switch")) {
 		fillin = NULL;
diff --git a/pbx/pbx_dundi.c b/pbx/pbx_dundi.c
index c7e68f788e7fd00910ff4eeff4ab83205a856e85..81559309d43a12de5a42d6e1ee6f96ac33ef6527 100755
--- a/pbx/pbx_dundi.c
+++ b/pbx/pbx_dundi.c
@@ -1568,7 +1568,7 @@ static int handle_command_response(struct dundi_transaction *trans, struct dundi
 				if (cmd == DUNDI_COMMAND_EIDQUERY) {
 					res = dundi_answer_entity(trans, &ies, ies.called_context);
 				} else {
-					if (!ies.called_number || ast_strlen_zero(ies.called_number)) {
+					if (ast_strlen_zero(ies.called_number)) {
 						/* They're not permitted to access that context */
 						dundi_ie_append_cause(&ied, DUNDI_IE_CAUSE, DUNDI_CAUSE_GENERAL, "Invalid or missing number/entity");
 						dundi_send(trans, resp, 0, 1, &ied);
@@ -3872,7 +3872,7 @@ static int dundi_lookup_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, "DUNDiLookup requires an argument (number)\n");
 		LOCAL_USER_REMOVE(u);
 		return 0;
@@ -3898,7 +3898,7 @@ static int dundi_lookup_exec(struct ast_channel *chan, void *data)
 		}
 	}
 
-	if (!context || ast_strlen_zero(context))
+	if (ast_strlen_zero(context))
 		context = "e164";
 	
 	results = dundi_lookup(dr, MAX_RESULTS, NULL, context, num, bypass);
@@ -3934,7 +3934,7 @@ static char *dundifunc_read(struct ast_channel *chan, char *cmd, char *data, cha
 
 	buf[0] = '\0';
 
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "DUNDILOOKUP requires an argument (number)\n");
 		LOCAL_USER_REMOVE(u);
 		return buf;
@@ -3960,7 +3960,7 @@ static char *dundifunc_read(struct ast_channel *chan, char *cmd, char *data, cha
 		}
 	}
 
-	if (!context || ast_strlen_zero(context))
+	if (ast_strlen_zero(context))
 		context = "e164";
 	
 	results = dundi_lookup(dr, MAX_RESULTS, NULL, context, num, bypass);
@@ -4447,19 +4447,19 @@ static int dundi_helper(struct ast_channel *chan, const char *context, const cha
 		/* If done as a macro, use macro extension */
 		if (!strcasecmp(exten, "s")) {
 			exten = pbx_builtin_getvar_helper(chan, "ARG1");
-			if (!exten || ast_strlen_zero(exten))
+			if (ast_strlen_zero(exten))
 				exten = chan->macroexten;
-			if (!exten || ast_strlen_zero(exten))
+			if (ast_strlen_zero(exten))
 				exten = chan->exten;
-			if (!exten || ast_strlen_zero(exten)) {	
+			if (ast_strlen_zero(exten)) {	
 				ast_log(LOG_WARNING, "Called in Macro mode with no ARG1 or MACRO_EXTEN?\n");
 				return -1;
 			}
 		}
-		if (!data || ast_strlen_zero(data))
+		if (ast_strlen_zero(data))
 			data = "e164";
 	} else {
-		if (!data || ast_strlen_zero(data))
+		if (ast_strlen_zero(data))
 			data = context;
 	}
 	res = dundi_lookup(results, MAX_RESULTS, chan, data, exten, 0);
@@ -4498,19 +4498,19 @@ static int dundi_exec(struct ast_channel *chan, const char *context, const char
 		/* If done as a macro, use macro extension */
 		if (!strcasecmp(exten, "s")) {
 			exten = pbx_builtin_getvar_helper(chan, "ARG1");
-			if (!exten || ast_strlen_zero(exten))
+			if (ast_strlen_zero(exten))
 				exten = chan->macroexten;
-			if (!exten || ast_strlen_zero(exten))
+			if (ast_strlen_zero(exten))
 				exten = chan->exten;
-			if (!exten || ast_strlen_zero(exten)) {	
+			if (ast_strlen_zero(exten)) {	
 				ast_log(LOG_WARNING, "Called in Macro mode with no ARG1 or MACRO_EXTEN?\n");
 				return -1;
 			}
 		}
-		if (!data || ast_strlen_zero(data))
+		if (ast_strlen_zero(data))
 			data = "e164";
 	} else {
-		if (!data || ast_strlen_zero(data))
+		if (ast_strlen_zero(data))
 			data = context;
 	}
 	res = dundi_lookup(results, MAX_RESULTS, chan, data, exten, 0);
diff --git a/pbx/pbx_loopback.c b/pbx/pbx_loopback.c
index 6fa35f2db5320b42b423e520af0ecd414cb6b093..2abc11735998de3a9361a6200d035d04e253e8a1 100755
--- a/pbx/pbx_loopback.c
+++ b/pbx/pbx_loopback.c
@@ -122,9 +122,9 @@ static void loopback_subst(char **newexten, char **newcontext, int *priority, ch
 		pri = strchr(buf, ':');
 	if (!ast_strlen_zero(buf))
 		*newexten = buf;
-	if (con && !ast_strlen_zero(con))
+	if (!ast_strlen_zero(con))
 		*newcontext = con;
-	if (pri && !ast_strlen_zero(pri))
+	if (!ast_strlen_zero(pri))
 		sscanf(pri, "%d", priority);
 }
 
diff --git a/pbx/pbx_realtime.c b/pbx/pbx_realtime.c
index af44f51e2d8ec8d74032805a5ecb712684479556..6b1c4511a6e4c7bc63b4754bf9a54378cafbeb74 100755
--- a/pbx/pbx_realtime.c
+++ b/pbx/pbx_realtime.c
@@ -97,9 +97,9 @@ static char *tdesc = "Realtime Switch";
 			table++;\
 			cxt = buf; \
 		} else cxt = NULL; \
-		if (!cxt || ast_strlen_zero(cxt)) \
+		if (ast_strlen_zero(cxt)) \
 			cxt = context;\
-		if (!table || ast_strlen_zero(table)) \
+		if (ast_strlen_zero(table)) \
 			table = "extensions"; \
 		var = realtime_switch_common(table, cxt, exten, priority, mode); \
 	} else \
diff --git a/res/res_agi.c b/res/res_agi.c
index de3fcf0f78b071c840f579fbb93775f66d5feaf4..9ec6f5cb6c09efa48905a62ee893a13ab2aa06a4 100755
--- a/res/res_agi.c
+++ b/res/res_agi.c
@@ -2009,7 +2009,7 @@ static int agi_exec_full(struct ast_channel *chan, void *data, int enhanced, int
         char *stringp;
 	AGI agi;
 
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "AGI requires an argument (script)\n");
 		return -1;
 	}
diff --git a/res/res_config_odbc.c b/res/res_config_odbc.c
index 10b3dab9f5f51af30b8eb26f6ecea92a455e56b5..bd19c63010adbbec8801a31da62af3c8df3a5829 100755
--- a/res/res_config_odbc.c
+++ b/res/res_config_odbc.c
@@ -168,7 +168,7 @@ static struct ast_variable *realtime_odbc(const char *database, const char *tabl
 		stringp = rowdata;
 		while(stringp) {
 			chunk = strsep(&stringp, ";");
-			if (chunk && !ast_strlen_zero(ast_strip(chunk))) {
+			if (!ast_strlen_zero(ast_strip(chunk))) {
 				if (prev) {
 					prev->next = ast_variable_new(coltitle, chunk);
 					if (prev->next)
@@ -320,7 +320,7 @@ static struct ast_config *realtime_multi_odbc(const char *database, const char *
 			stringp = rowdata;
 			while(stringp) {
 				chunk = strsep(&stringp, ";");
-				if (chunk && !ast_strlen_zero(ast_strip(chunk))) {
+				if (!ast_strlen_zero(ast_strip(chunk))) {
 					if (initfield && !strcmp(initfield, coltitle))
 						ast_category_rename(cat, chunk);
 					var = ast_variable_new(coltitle, chunk);
diff --git a/res/res_features.c b/res/res_features.c
index 8e3be8d017d3e444c0d95a4f00d54cde5af2d89d..5ac3cdac0974e5e5402aae0186c5dd83b3045314 100755
--- a/res/res_features.c
+++ b/res/res_features.c
@@ -183,7 +183,7 @@ static void check_goto_on_transfer(struct ast_channel *chan)
 
 	goto_on_transfer = pbx_builtin_getvar_helper(chan, "GOTO_ON_BLINDXFR");
 
-	if (goto_on_transfer && !ast_strlen_zero(goto_on_transfer) && (xferchan = ast_channel_alloc(0))) {
+	if (!ast_strlen_zero(goto_on_transfer) && (xferchan = ast_channel_alloc(0))) {
 		char *x;
 		struct ast_frame *f;
 		
@@ -1002,7 +1002,7 @@ static int ast_feature_interpret(struct ast_channel *chan, struct ast_channel *p
 	}
 
 
-	if (dynamic_features && !ast_strlen_zero(dynamic_features)) {
+	if (!ast_strlen_zero(dynamic_features)) {
 		char *tmp = ast_strdupa(dynamic_features);
 		char *tok;
 
@@ -1868,7 +1868,7 @@ static int manager_parking_status( struct mansession *s, struct message *m )
 	char *id = astman_get_header(m,"ActionID");
 	char idText[256] = "";
 
-	if (id && !ast_strlen_zero(id))
+	if (!ast_strlen_zero(id))
 		snprintf(idText,256,"ActionID: %s\r\n",id);
 
 	astman_send_ack(s, m, "Parked calls will follow");
diff --git a/res/res_monitor.c b/res/res_monitor.c
index 89fb5aef932b3cbb98fb23f645e4d8816da38a62..35366bdf0f48fc9b406379edd5605722832db294 100755
--- a/res/res_monitor.c
+++ b/res/res_monitor.c
@@ -123,7 +123,7 @@ int ast_monitor_start(	struct ast_channel *chan, const char *format_spec,
 		memset(monitor, 0, sizeof(struct ast_channel_monitor));
 
 		/* Determine file names */
-		if (fname_base && !ast_strlen_zero(fname_base)) {
+		if (!ast_strlen_zero(fname_base)) {
 			int directory = strchr(fname_base, '/') ? 1 : 0;
 			/* try creating the directory just in case it doesn't exist */
 			if (directory) {
@@ -162,7 +162,7 @@ int ast_monitor_start(	struct ast_channel *chan, const char *format_spec,
 		monitor->stop = ast_monitor_stop;
 
 		/* Determine file format */
-		if (format_spec && !ast_strlen_zero(format_spec)) {
+		if (!ast_strlen_zero(format_spec)) {
 			monitor->format = strdup(format_spec);
 		} else {
 			monitor->format = strdup("wav");
@@ -264,12 +264,12 @@ int ast_monitor_stop(struct ast_channel *chan, int need_lock)
 
 			/* Set the execute application */
 			execute = pbx_builtin_getvar_helper(chan, "MONITOR_EXEC");
-			if (!execute || ast_strlen_zero(execute)) { 
+			if (ast_strlen_zero(execute)) { 
 				execute = "nice -n 19 soxmix";
 				delfiles = 1;
 			} 
 			execute_args = pbx_builtin_getvar_helper(chan, "MONITOR_EXEC_ARGS");
-			if (!execute_args || ast_strlen_zero(execute_args)) {
+			if (ast_strlen_zero(execute_args)) {
 				execute_args = "";
 			}
 			
@@ -297,7 +297,7 @@ int ast_monitor_stop(struct ast_channel *chan, int need_lock)
 int ast_monitor_change_fname(struct ast_channel *chan, const char *fname_base, int need_lock)
 {
 	char tmp[256];
-	if ((!fname_base) || (ast_strlen_zero(fname_base))) {
+	if (ast_strlen_zero(fname_base)) {
 		ast_log(LOG_WARNING, "Cannot change monitor filename of channel %s to null", chan->name);
 		return -1;
 	}
@@ -344,7 +344,7 @@ static int start_monitor_exec(struct ast_channel *chan, void *data)
 	int res = 0;
 	
 	/* Parse arguments. */
-	if (data && !ast_strlen_zero((char*)data)) {
+	if (!ast_strlen_zero((char*)data)) {
 		arg = ast_strdupa((char*)data);
 		format = arg;
 		fname_base = strchr(arg, '|');
@@ -433,7 +433,7 @@ static int start_monitor_action(struct mansession *s, struct message *m)
 	char *mix = astman_get_header(m, "Mix");
 	char *d;
 	
-	if ((!name) || (ast_strlen_zero(name))) {
+	if (ast_strlen_zero(name)) {
 		astman_send_error(s, m, "No channel specified");
 		return 0;
 	}
@@ -443,7 +443,7 @@ static int start_monitor_action(struct mansession *s, struct message *m)
 		return 0;
 	}
 
-	if ((!fname) || (ast_strlen_zero(fname))) {
+	if (ast_strlen_zero(fname)) {
 		/* No filename base specified, default to channel name as per CLI */
 		fname = malloc (FILENAME_MAX);
 		if (!fname) {
@@ -484,7 +484,7 @@ static int stop_monitor_action(struct mansession *s, struct message *m)
 	struct ast_channel *c = NULL;
 	char *name = astman_get_header(m, "Channel");
 	int res;
-	if ((!name) || (ast_strlen_zero(name))) {
+	if (ast_strlen_zero(name)) {
 		astman_send_error(s, m, "No channel specified");
 		return 0;
 	}
@@ -516,11 +516,11 @@ static int change_monitor_action(struct mansession *s, struct message *m)
 	struct ast_channel *c = NULL;
 	char *name = astman_get_header(m, "Channel");
 	char *fname = astman_get_header(m, "File");
-	if ((!name) || (ast_strlen_zero(name))) {
+	if (ast_strlen_zero(name)) {
 		astman_send_error(s, m, "No channel specified");
 		return 0;
 	}
-	if ((!fname)||(ast_strlen_zero(fname))) {
+	if (ast_strlen_zero(fname)) {
 		astman_send_error(s, m, "No filename specified");
 		return 0;
 	}
diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c
index e029265ddf44500b6165618f66f30de8bc4d4b6b..2939659dc437943ca6c5a81819b013885bbc662f 100755
--- a/res/res_musiconhold.c
+++ b/res/res_musiconhold.c
@@ -361,7 +361,7 @@ static int spawn_mp3(struct mohclass *class)
 		/* Look for extra arguments and add them to the list */
 		strncpy(xargs, class->args, sizeof(xargs) - 1);
 		argptr = xargs;
-		while (argptr && !ast_strlen_zero(argptr)) {
+		while (!ast_strlen_zero(argptr)) {
 			argv[argc++] = argptr;
 			argptr = strchr(argptr, ',');
 			if (argptr) {
@@ -373,7 +373,7 @@ static int spawn_mp3(struct mohclass *class)
 		/* Format arguments for argv vector */
 		strncpy(xargs, class->args, sizeof(xargs) - 1);
 		argptr = xargs;
-		while (argptr && !ast_strlen_zero(argptr)) {
+		while (!ast_strlen_zero(argptr)) {
 			argv[argc++] = argptr;
 			argptr = strchr(argptr, ' ');
 			if (argptr) {
@@ -569,7 +569,7 @@ static int moh1_exec(struct ast_channel *chan, void *data)
 
 static int moh2_exec(struct ast_channel *chan, void *data)
 {
-	if (!data || ast_strlen_zero(data)) {
+	if (ast_strlen_zero(data)) {
 		ast_log(LOG_WARNING, "SetMusicOnHold requires an argument (class)\n");
 		return -1;
 	}
@@ -865,9 +865,9 @@ static int local_ast_moh_start(struct ast_channel *chan, char *class)
 {
 	struct mohclass *mohclass;
 
-	if (!class || ast_strlen_zero(class))
+	if (ast_strlen_zero(class))
 		class = chan->musicclass;
-	if (!class || ast_strlen_zero(class))
+	if (ast_strlen_zero(class))
 		class = "default";
 	ast_mutex_lock(&moh_lock);
 	mohclass = get_mohbyname(class);