diff --git a/app.c b/app.c
index afc621390e46cbbde6c8fb48487b9c7f0bf8aedf..dcd4d6dc796ad006e2dff2f03711d638bbbf51c8 100644
--- a/app.c
+++ b/app.c
@@ -523,7 +523,7 @@ static int __ast_play_and_record(struct ast_channel *chan, const char *playfile,
 	ast_log(LOG_DEBUG,"Recording Formats: sfmts=%s\n", fmts);
 	sfmt[0] = ast_strdupa(fmts);
 
-	while((fmt = strsep(&stringp, "|"))) {
+	while ((fmt = strsep(&stringp, "|"))) {
 		if (fmtcnt > MAX_OTHER_FORMATS - 1) {
 			ast_log(LOG_WARNING, "Please increase MAX_OTHER_FORMATS in app.c\n");
 			break;
@@ -1092,13 +1092,12 @@ static int ivr_dispatch(struct ast_channel *chan, struct ast_ivr_option *option,
 	case AST_ACTION_BACKLIST:
 		res = 0;
 		c = ast_strdupa(option->adata);
-		if (c) {
-			while((n = strsep(&c, ";")))
-				if ((res = ast_stream_and_wait(chan, n, chan->language,
-						(option->action == AST_ACTION_BACKLIST) ? AST_DIGIT_ANY : "")))
-					break;
-			ast_stopstream(chan);
+		while ((n = strsep(&c, ";"))) {
+			if ((res = ast_stream_and_wait(chan, n, chan->language,
+					(option->action == AST_ACTION_BACKLIST) ? AST_DIGIT_ANY : "")))
+				break;
 		}
+		ast_stopstream(chan);
 		return res;
 	default:
 		ast_log(LOG_NOTICE, "Unknown dispatch function %d, ignoring!\n", option->action);
diff --git a/apps/app_amd.c b/apps/app_amd.c
index 16fc6bf64dc4a55a11e08478fbab516a55e105d6..b79f823d91b70bc5d8a0b5be9c3cb3b08f9ec969 100644
--- a/apps/app_amd.c
+++ b/apps/app_amd.c
@@ -140,12 +140,7 @@ static void isAnsweringMachine(struct ast_channel *chan, void *data)
 		ast_log(LOG_NOTICE, "AMD using the default parameters.\n");
 	} else {
 		/* Some arguments have been passed. Lets parse them and overwrite the defaults. */
-		if (!(parse = ast_strdupa(data))) {
-			ast_log(LOG_WARNING, "Memory allocation failure\n");
-			pbx_builtin_setvar_helper(chan , "AMDSTATUS" , "" );
-			pbx_builtin_setvar_helper(chan , "AMDCAUSE" , "" );
-			return;
-		}
+		parse = ast_strdupa(data);
 
 		AST_STANDARD_APP_ARGS(args, parse);
 
diff --git a/apps/app_authenticate.c b/apps/app_authenticate.c
index eb3b7184d4813cbdd8a21f9c2a07a4999f022fd6..bb67fb1943a6f6534e595d25f315692f47908c1d 100644
--- a/apps/app_authenticate.c
+++ b/apps/app_authenticate.c
@@ -123,10 +123,7 @@ static int auth_exec(struct ast_channel *chan, void *data)
 		}
 	}
 	
-	if (!(argcopy = ast_strdupa(data))) {
-		LOCAL_USER_REMOVE(u);
-		return -1;
-	}
+	argcopy = ast_strdupa(data);
 
 	AST_STANDARD_APP_ARGS(arglist,argcopy);
 	
diff --git a/apps/app_db.c b/apps/app_db.c
index bb4bcbd9c3138128f021d125aa16733ab730030e..4c5f5c6fa042a0a7cb641e0408349201d2d567f2 100644
--- a/apps/app_db.c
+++ b/apps/app_db.c
@@ -71,10 +71,7 @@ static int deltree_exec(struct ast_channel *chan, void *data)
 
 	LOCAL_USER_ADD(u);
 
-	if (!(argv = ast_strdupa(data))) {
-		LOCAL_USER_REMOVE(u);
-		return 0;
-	}
+	argv = ast_strdupa(data);
 
 	if (strchr(argv, '/')) {
 		family = strsep(&argv, "/");
@@ -115,10 +112,7 @@ static int del_exec(struct ast_channel *chan, void *data)
 
 	LOCAL_USER_ADD(u);
 
-	if (!(argv = ast_strdupa(data))) {
-		LOCAL_USER_REMOVE(u);
-		return 0;
-	}
+	argv = ast_strdupa(data);
 
 	if (strchr(argv, '/')) {
 		family = strsep(&argv, "/");
diff --git a/apps/app_dial.c b/apps/app_dial.c
index 7d97187e3ab8c72c00fc7484db60b6bea869bf61..b3fe1c0237ba5da435b050b90ec74dadc27fcb17 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -787,8 +787,7 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
 
 	LOCAL_USER_ADD(u);
 
-	if (!(parse = ast_strdupa(data)))
-		goto done;
+	parse = ast_strdupa(data);
 
 	AST_STANDARD_APP_ARGS(args, parse);
 
@@ -1596,8 +1595,7 @@ static int retrydial_exec(struct ast_channel *chan, void *data)
 
 	LOCAL_USER_ADD(u);
 
-	if (!(announce = ast_strdupa(data)))
-		goto done;
+	announce = ast_strdupa(data);
 
 	memset(&peerflags, 0, sizeof(peerflags));
 
diff --git a/apps/app_dictate.c b/apps/app_dictate.c
index 95f81409674e98a9492f1b25b2ae1de374fc35c4..769121dc7694c1172a72c4201961c70d9f68452f 100644
--- a/apps/app_dictate.c
+++ b/apps/app_dictate.c
@@ -107,8 +107,7 @@ static int dictate_exec(struct ast_channel *chan, void *data)
 	
 	snprintf(dftbase, sizeof(dftbase), "%s/dictate", ast_config_AST_SPOOL_DIR);
 	if (!ast_strlen_zero(data)) {
-		if (!(parse = ast_strdupa(data)))
-			return -1;
+		parse = ast_strdupa(data);
 		AST_STANDARD_APP_ARGS(args, parse);
 	} else
 		args.argc = 0;
diff --git a/apps/app_directory.c b/apps/app_directory.c
index d5851d9da6e79026d061794cc1133cf93b6d9750..0dc7dc1c50358fad70ac4297f11302d2ba7002f2 100644
--- a/apps/app_directory.c
+++ b/apps/app_directory.c
@@ -411,10 +411,7 @@ static int directory_exec(struct ast_channel *chan, void *data)
 
 	LOCAL_USER_ADD(u);
 
-	if (!(parse = ast_strdupa(data))) {
-		LOCAL_USER_REMOVE(u);
-		return -1; 
-	}
+	parse = ast_strdupa(data);
 
 	AST_STANDARD_APP_ARGS(args, parse);
 		
diff --git a/apps/app_disa.c b/apps/app_disa.c
index d7c3a5872cb673b73fbbff0df32581f2f7076c15..b49fe47a6e401198a001f1f35b57f0f6f3bc55e4 100644
--- a/apps/app_disa.c
+++ b/apps/app_disa.c
@@ -158,10 +158,7 @@ static int disa_exec(struct ast_channel *chan, void *data)
 	ast_log(LOG_DEBUG, "Digittimeout: %d\n", digittimeout);
 	ast_log(LOG_DEBUG, "Responsetimeout: %d\n", firstdigittimeout);
 
-	if (!(tmp = ast_strdupa(data))) {
-		LOCAL_USER_REMOVE(u);
-		return -1;
-	}	
+	tmp = ast_strdupa(data);
 
 	AST_STANDARD_APP_ARGS(args, tmp);
 
diff --git a/apps/app_exec.c b/apps/app_exec.c
index d41bf27b3b5000cfa9e6d691d3ed82958ea47193..e9564b19d85d18b6eca548dc0ab3da8e0a3a8f22 100644
--- a/apps/app_exec.c
+++ b/apps/app_exec.c
@@ -80,8 +80,7 @@ static char *tryexec_descrip =
 "The channel variable TRYSTATUS will be set to:\n"
 "    SUCCESS   if the application returned zero\n"
 "    FAILED    if the application returned non-zero\n"
-"    NOAPP     if the application was not found or was not specified\n"
-"    NOMEMORY  if there was not enough memory to execute.\n";
+"    NOAPP     if the application was not found or was not specified\n";
 
 static char *app_execif = "ExecIf";
 static char *execif_synopsis = "Executes dialplan application, conditionally";
@@ -104,25 +103,23 @@ static int exec_exec(struct ast_channel *chan, void *data)
 
 	/* Check and parse arguments */
 	if (data) {
-		if ((s = ast_strdupa(data))) {
-			appname = strsep(&s, "(");
-			if (s) {
-				endargs = strrchr(s, ')');
-				if (endargs)
-					*endargs = '\0';
-				pbx_substitute_variables_helper(chan, s, args, MAXRESULT - 1);
-			}
-			if (appname) {
-				app = pbx_findapp(appname);
-				if (app) {
-					res = pbx_exec(chan, app, args);
-				} else {
-					ast_log(LOG_WARNING, "Could not find application (%s)\n", appname);
-					res = -1;
-				}
+		s = ast_strdupa(data);
+		appname = strsep(&s, "(");
+		if (s) {
+			endargs = strrchr(s, ')');
+			if (endargs)
+				*endargs = '\0';
+			pbx_substitute_variables_helper(chan, s, args, MAXRESULT - 1);
+		}
+		if (appname) {
+			app = pbx_findapp(appname);
+			if (app) {
+				res = pbx_exec(chan, app, args);
+			} else {
+				ast_log(LOG_WARNING, "Could not find application (%s)\n", appname);
+				res = -1;
 			}
-		} else
-			res = -1;
+		}
 	}
 
 	LOCAL_USER_REMOVE(u);
@@ -140,27 +137,23 @@ static int tryexec_exec(struct ast_channel *chan, void *data)
 
 	/* Check and parse arguments */
 	if (data) {
-		if ((s = ast_strdupa(data))) {
-			appname = strsep(&s, "(");
-			if (s) {
-				endargs = strrchr(s, ')');
-				if (endargs)
-					*endargs = '\0';
-				pbx_substitute_variables_helper(chan, s, args, MAXRESULT - 1);
-			}
-			if (appname) {
-				app = pbx_findapp(appname);
-				if (app) {
-					res = pbx_exec(chan, app, args);
-					pbx_builtin_setvar_helper(chan, "TRYSTATUS", res ? "FAILED" : "SUCCESS");
-				} else {
-					ast_log(LOG_WARNING, "Could not find application (%s)\n", appname);
-					pbx_builtin_setvar_helper(chan, "TRYSTATUS", "NOAPP");
-				}
+		s = ast_strdupa(data);
+		appname = strsep(&s, "(");
+		if (s) {
+			endargs = strrchr(s, ')');
+			if (endargs)
+				*endargs = '\0';
+			pbx_substitute_variables_helper(chan, s, args, MAXRESULT - 1);
+		}
+		if (appname) {
+			app = pbx_findapp(appname);
+			if (app) {
+				res = pbx_exec(chan, app, args);
+				pbx_builtin_setvar_helper(chan, "TRYSTATUS", res ? "FAILED" : "SUCCESS");
+			} else {
+				ast_log(LOG_WARNING, "Could not find application (%s)\n", appname);
+				pbx_builtin_setvar_helper(chan, "TRYSTATUS", "NOAPP");
 			}
-		} else {
-			ast_log(LOG_ERROR, "Out of memory\n");
-			pbx_builtin_setvar_helper(chan, "TRYSTATUS", "NOMEMORY");
 		}
 	}
 
@@ -178,10 +171,7 @@ static int execif_exec(struct ast_channel *chan, void *data) {
 
 	LOCAL_USER_ADD(u);
 
-	if (!(expr = ast_strdupa(data))) {
-		LOCAL_USER_REMOVE(u);
-		return -1;
-	}
+	expr = ast_strdupa(data);
 
 	if ((myapp = strchr(expr,'|'))) {
 		*myapp = '\0';
diff --git a/apps/app_externalivr.c b/apps/app_externalivr.c
index 7a9757ed1bf8d9e85e6515dcd45a057d0d8c511a..ecc8bf88895077bc04614d470f4a76688e2f8c07 100644
--- a/apps/app_externalivr.c
+++ b/apps/app_externalivr.c
@@ -275,10 +275,7 @@ static int app_exec(struct ast_channel *chan, void *data)
 		return -1;	
 	}
 
-	if (!(buf = ast_strdupa(data))) {
-		LOCAL_USER_REMOVE(lu);
-		return -1;
-	}
+	buf = ast_strdupa(data);
 
 	argc = ast_app_separate_args(buf, '|', argv, sizeof(argv) / sizeof(argv[0]));
 
diff --git a/apps/app_festival.c b/apps/app_festival.c
index cb38d42fd1b9ba4426c62d6b5526d27a2c53c310..5a4bb053ed89c7198f63d1e8cf740f202825f5bf 100644
--- a/apps/app_festival.c
+++ b/apps/app_festival.c
@@ -356,11 +356,7 @@ static int festival_exec(struct ast_channel *chan, void *vdata)
 		festivalcommand = newfestivalcommand;
 	}
 	
-	if (!(data = ast_strdupa(vdata))) {
-		ast_config_destroy(cfg);
-		LOCAL_USER_REMOVE(u);
-		return -1;
-	}
+	data = ast_strdupa(vdata);
 
 	intstr = strchr(data, '|');
 	if (intstr) {	
diff --git a/apps/app_hasnewvoicemail.c b/apps/app_hasnewvoicemail.c
index f21bd7ae6cf6f0a9035beb92eea514526f99b6bd..2bc730e10551aa1b3bd2ed90dedc1e67a53f286f 100644
--- a/apps/app_hasnewvoicemail.c
+++ b/apps/app_hasnewvoicemail.c
@@ -126,10 +126,7 @@ static int hasvoicemail_exec(struct ast_channel *chan, void *data)
 
 	LOCAL_USER_ADD(u);
 
-	if (!(input = ast_strdupa(data))) {
-		LOCAL_USER_REMOVE(u);
-		return -1;
-	}
+	input = ast_strdupa(data);
 
 	AST_STANDARD_APP_ARGS(args, input);
 
diff --git a/apps/app_image.c b/apps/app_image.c
index 9e69bd4cd6b4ed852aa463f9834a44834ce62f8e..51389a6763594b0277d0e1b1c960c842d5ede196 100644
--- a/apps/app_image.c
+++ b/apps/app_image.c
@@ -76,10 +76,7 @@ static int sendimage_exec(struct ast_channel *chan, void *data)
 	
 	LOCAL_USER_ADD(u);
 
-	if (!(parse = ast_strdupa(data))) {
-		LOCAL_USER_REMOVE(u);
-		return -1;
-	}
+	parse = ast_strdupa(data);
 
 	AST_STANDARD_APP_ARGS(args, parse);
 
diff --git a/apps/app_mixmonitor.c b/apps/app_mixmonitor.c
index 7b16d48e97ca74b1734ce19733836bd59dc26476..324c3a3cf746e64e3d791e0713394978a0663f31 100644
--- a/apps/app_mixmonitor.c
+++ b/apps/app_mixmonitor.c
@@ -338,10 +338,7 @@ static int mixmonitor_exec(struct ast_channel *chan, void *data)
 
 	LOCAL_USER_ADD(u);
 
-	if (!(parse = ast_strdupa(data))) {
-		LOCAL_USER_REMOVE(u);
-		return -1;
-	}
+	parse = ast_strdupa(data);
 
 	AST_STANDARD_APP_ARGS(args, parse);
 	
diff --git a/apps/app_osplookup.c b/apps/app_osplookup.c
index 7c09fee02314a101850e2e60159a5bc238cbac0f..6497983803b60892be7c79fc5a4cabeed9aa11a2 100644
--- a/apps/app_osplookup.c
+++ b/apps/app_osplookup.c
@@ -137,11 +137,7 @@ static int ospauth_exec(struct ast_channel *chan, void *data)
 
 	LOCAL_USER_ADD(u);
 
-	if (!(tmp = ast_strdupa(data))) {
-		ast_log(LOG_ERROR, "Out of memory\n");
-		LOCAL_USER_REMOVE(u);
-		return(-1);
-	}
+	tmp = ast_strdupa(data);
 
 	AST_STANDARD_APP_ARGS(args, tmp);
 
@@ -232,11 +228,7 @@ static int osplookup_exec(struct ast_channel *chan, void *data)
 
 	LOCAL_USER_ADD(u);
 
-	if (!(tmp = ast_strdupa(data))) {
-		ast_log(LOG_ERROR, "Out of memory\n");
-		LOCAL_USER_REMOVE(u);
-		return(-1);
-	}
+	tmp = ast_strdupa(data);
 
 	AST_STANDARD_APP_ARGS(args, tmp);
 
@@ -382,11 +374,7 @@ static int ospnext_exec(struct ast_channel *chan, void *data)
 
 	LOCAL_USER_ADD(u);
 
-	if (!(tmp = ast_strdupa(data))) {
-		ast_log(LOG_ERROR, "Out of memory\n");
-		LOCAL_USER_REMOVE(u);
-		return(-1);
-	}
+	tmp = ast_strdupa(data);
 
 	AST_STANDARD_APP_ARGS(args, tmp);
 
@@ -506,11 +494,7 @@ static int ospfinished_exec(struct ast_channel *chan, void *data)
 	
 	LOCAL_USER_ADD(u);
 
-	if (!(tmp = ast_strdupa(data))) {
-		ast_log(LOG_ERROR, "Out of memory\n");
-		LOCAL_USER_REMOVE(u);
-		return(-1);
-	}
+	tmp = ast_strdupa(data);
 
 	AST_STANDARD_APP_ARGS(args, tmp);
 
diff --git a/apps/app_page.c b/apps/app_page.c
index 7184ab9ad15a205aa2a3666c597f8881a2250bd7..cbc9b23c0848b0d165744bef901b4324baf29a96 100644
--- a/apps/app_page.c
+++ b/apps/app_page.c
@@ -167,10 +167,7 @@ static int page_exec(struct ast_channel *chan, void *data)
 		return -1;
 	};
 
-	if (!(options = ast_strdupa(data))) {
-		LOCAL_USER_REMOVE(u);
-		return -1;
-	}
+	options = ast_strdupa(data);
 
 	ast_copy_string(originator, chan->name, sizeof(originator));
 	if ((tmp = strchr(originator, '-')))
diff --git a/apps/app_playback.c b/apps/app_playback.c
index 2816d53df07d863ea27031d85e454698dff01ce3..abf9cd613a36f3ec2e0c20ed128affc5e0556b71 100644
--- a/apps/app_playback.c
+++ b/apps/app_playback.c
@@ -167,8 +167,6 @@ static int do_say(say_args_t *a, const char *s, const char *options, int depth)
 		a->language = "en";     /* default */
 	ast_log(LOG_WARNING, "try <%s> in <%s>\n", s, a->language);
 	lang = ast_strdupa(a->language);
-	if (!lang)      /* no memory! */
-		return -1;
 	for (;;) {
 		for (v = ast_variable_browse(say_cfg, lang); v ; v = v->next) {
 			if (ast_extension_match(v->name, s)) {
@@ -401,8 +399,7 @@ static int playback_exec(struct ast_channel *chan, void *data)
 		return -1;
 	}
 
-	if (!(tmp = ast_strdupa(data)))
-		return -1;	
+	tmp = ast_strdupa(data);
 
 	LOCAL_USER_ADD(u);
 	AST_STANDARD_APP_ARGS(args, tmp);
diff --git a/apps/app_privacy.c b/apps/app_privacy.c
index 00af9fc2730a398fbd4d95fa4792307636a26ae7..c1a0ea8e25f099f816a7c079910951a1b686888a 100644
--- a/apps/app_privacy.c
+++ b/apps/app_privacy.c
@@ -113,10 +113,7 @@ static int privacy_exec (struct ast_channel *chan, void *data)
 
 		if (!ast_strlen_zero((char *)data))
 		{
-			if (!(parse = ast_strdupa(data))) {
-				LOCAL_USER_REMOVE(u);
-				return -1;
-			}
+			parse = ast_strdupa(data);
 			
 			AST_STANDARD_APP_ARGS(args, parse);
 
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 25329a938d74650146566346d53f126efdc8b642..c19b187271e783f97fd00e406ba0e68b3f1ff776 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -2769,8 +2769,7 @@ static int pqm_exec(struct ast_channel *chan, void *data)
 		return -1;
 	}
 
-	if (!(parse = ast_strdupa(data)))
-		return -1;
+	parse = ast_strdupa(data);
 
 	AST_STANDARD_APP_ARGS(args, parse);
 
@@ -2822,8 +2821,7 @@ static int upqm_exec(struct ast_channel *chan, void *data)
 		return -1;
 	}
 
-	if (!(parse = ast_strdupa(data))) 
-		return -1;
+	parse = ast_strdupa(data);
 
 	AST_STANDARD_APP_ARGS(args, parse);
 
@@ -2877,8 +2875,7 @@ static int rqm_exec(struct ast_channel *chan, void *data)
 		return -1;
 	}
 
-	if (!(parse = ast_strdupa(data)))
-		return -1;
+	parse = ast_strdupa(data);
 
 	AST_STANDARD_APP_ARGS(args, parse);
 
@@ -2942,8 +2939,7 @@ static int aqm_exec(struct ast_channel *chan, void *data)
 		return -1;
 	}
 
-	if (!(parse = ast_strdupa(data)))
-		return -1;
+	parse = ast_strdupa(data);
 
 	AST_STANDARD_APP_ARGS(args, parse);
 
@@ -3029,10 +3025,6 @@ static int queue_exec(struct ast_channel *chan, void *data)
 	}
 	
 	parse = ast_strdupa(data);
-	if (!parse) {
-		ast_log(LOG_ERROR, "Out of memory!\n");
-		return -1;
-	}
 	AST_STANDARD_APP_ARGS(args, parse);
 
 	LOCAL_USER_ADD(lu);
diff --git a/apps/app_random.c b/apps/app_random.c
index 9809a533b200fc4ca8c9d0a8661dd0491bc13c6c..9b9fac88459219dc8aff0c488c05e9b3c8d051e5 100644
--- a/apps/app_random.c
+++ b/apps/app_random.c
@@ -71,10 +71,7 @@ static int random_exec(struct ast_channel *chan, void *data)
 	
 	LOCAL_USER_ADD(u);
 
-	if (!(s = ast_strdupa(data))) {
-		LOCAL_USER_REMOVE(u);
-		return -1;
-	}
+	s = ast_strdupa(data);
 
 	prob = strsep(&s,":");
 	if ((!prob) || (sscanf(prob, "%d", &probint) != 1))
diff --git a/apps/app_read.c b/apps/app_read.c
index fa1c01c926618197284b15ebf11d4d341e595ff6..5bd20be3a3240cea81412bb285550c3c8b126388 100644
--- a/apps/app_read.c
+++ b/apps/app_read.c
@@ -115,10 +115,7 @@ static int read_exec(struct ast_channel *chan, void *data)
 
 	LOCAL_USER_ADD(u);
 	
-	if (!(argcopy = ast_strdupa(data))) {
-		LOCAL_USER_REMOVE(u);
-		return -1;
-	}
+	argcopy = ast_strdupa(data);
 
 	AST_STANDARD_APP_ARGS(arglist, argcopy);
 
diff --git a/apps/app_readfile.c b/apps/app_readfile.c
index f0c1215aedd058b908416a595e9c70bda0c918c3..5eedce2bf84891fe6166c2352f2191f2ba804acf 100644
--- a/apps/app_readfile.c
+++ b/apps/app_readfile.c
@@ -70,10 +70,7 @@ static int readfile_exec(struct ast_channel *chan, void *data)
 
 	LOCAL_USER_ADD(u);
 
-	if (!(s = ast_strdupa(data))) {
-		LOCAL_USER_REMOVE(u);
-		return -1;
-	}
+	s = ast_strdupa(data);
 
 	varname = strsep(&s, "=");
 	file = strsep(&s, "|");
diff --git a/apps/app_realtime.c b/apps/app_realtime.c
index 49aa31cc348f1b33e9482065c2f4952744bb52dd..a1bd140a858e7c5afba1b2de03709332fcf8b0d2 100644
--- a/apps/app_realtime.c
+++ b/apps/app_realtime.c
@@ -149,16 +149,15 @@ static int realtime_update_exec(struct ast_channel *chan, void *data)
 	
 	LOCAL_USER_ADD(u);
 
-	if ((family = ast_strdupa(data))) {
-		if ((colmatch = strchr(family,'|'))) {
-			crop_data(colmatch);
-			if ((value = strchr(colmatch,'|'))) {
-				crop_data(value);
-				if ((newcol = strchr(value,'|'))) {
-					crop_data(newcol);
-					if ((newval = strchr(newcol,'|'))) 
-						crop_data(newval);
-				}
+	family = ast_strdupa(data);
+	if ((colmatch = strchr(family,'|'))) {
+		crop_data(colmatch);
+		if ((value = strchr(colmatch,'|'))) {
+			crop_data(value);
+			if ((newcol = strchr(value,'|'))) {
+				crop_data(newcol);
+				if ((newval = strchr(newcol,'|'))) 
+					crop_data(newval);
 			}
 		}
 	}
@@ -196,14 +195,13 @@ static int realtime_exec(struct ast_channel *chan, void *data)
 	
 	LOCAL_USER_ADD(u);
 
-	if ((family = ast_strdupa(data))) {
-		if ((colmatch = strchr(family,'|'))) {
-			crop_data(colmatch);
-			if ((value = strchr(colmatch,'|'))) {
-				crop_data(value);
-				if ((prefix = strchr(value,'|')))
-					crop_data(prefix);
-			}
+	family = ast_strdupa(data);
+	if ((colmatch = strchr(family,'|'))) {
+		crop_data(colmatch);
+		if ((value = strchr(colmatch,'|'))) {
+			crop_data(value);
+			if ((prefix = strchr(value,'|')))
+				crop_data(prefix);
 		}
 	}
 	if (! (family && value && colmatch) ) {
diff --git a/apps/app_record.c b/apps/app_record.c
index 38d6437e7e1847f95e5216df680a84826fa6ff8b..3a2a0f37c869cd07e10f81515630a47ff9c2036e 100644
--- a/apps/app_record.c
+++ b/apps/app_record.c
@@ -113,10 +113,7 @@ static int record_exec(struct ast_channel *chan, void *data)
 	LOCAL_USER_ADD(u);
 
 	/* Yay for strsep being easy */
-	if (!(vdata = ast_strdupa(data))) {
-		LOCAL_USER_REMOVE(u);
-		return -1;
-	}
+	vdata = ast_strdupa(data);
 
 	p = vdata;
 	filename = strsep(&p, "|");
diff --git a/apps/app_sayunixtime.c b/apps/app_sayunixtime.c
index 3cb797f454061bc7a4d518277b846387b0971d06..86a1fb990eaced6878bbfc0132331e34cc2a9940 100644
--- a/apps/app_sayunixtime.c
+++ b/apps/app_sayunixtime.c
@@ -84,8 +84,7 @@ static int sayunixtime_exec(struct ast_channel *chan, void *data)
 	if (!data)
 		return 0;
 
-	if (!(parse = ast_strdupa(data)))
-		return -1;
+	parse = ast_strdupa(data);
 
 	LOCAL_USER_ADD(u);
 
diff --git a/apps/app_senddtmf.c b/apps/app_senddtmf.c
index ece050f69df9d7b822fe0ec46c274304ca683328..fba595e0a2c21d364eb6a53cba5ef57defb8776f 100644
--- a/apps/app_senddtmf.c
+++ b/apps/app_senddtmf.c
@@ -73,10 +73,7 @@ static int senddtmf_exec(struct ast_channel *chan, void *data)
 
 	LOCAL_USER_ADD(u);
 
-	if (!(digits = ast_strdupa(data))) {
-		LOCAL_USER_REMOVE(u);
-		return -1;
-	}
+	digits = ast_strdupa(data);
 
 	if ((to = strchr(digits,'|'))) {
 		*to = '\0';
diff --git a/apps/app_sendtext.c b/apps/app_sendtext.c
index 87f0f0bec229a703e65b967ccfa5f22f4109266c..248c559bc00e549e06b20b2f56a0e0d53076dbab 100644
--- a/apps/app_sendtext.c
+++ b/apps/app_sendtext.c
@@ -83,12 +83,8 @@ static int sendtext_exec(struct ast_channel *chan, void *data)
 		ast_log(LOG_WARNING, "SendText requires an argument (text[|options])\n");
 		LOCAL_USER_REMOVE(u);
 		return -1;
-	} else {
-		if (!(parse = ast_strdupa(data))) {
-			LOCAL_USER_REMOVE(u);
-			return -1;
-		}
-	}
+	} else
+		parse = ast_strdupa(data);
 	
 	AST_STANDARD_APP_ARGS(args, parse);
 
diff --git a/apps/app_setcallerid.c b/apps/app_setcallerid.c
index 5d34859fcddc50a781422a596d2c00728f944668..a92f35741cae023d24fec62a2087b4f762af906c 100644
--- a/apps/app_setcallerid.c
+++ b/apps/app_setcallerid.c
@@ -115,10 +115,7 @@ static int setcallerid_exec(struct ast_channel *chan, void *data)
 	
 	LOCAL_USER_ADD(u);
 	
-	if (!(tmp = ast_strdupa(data))) {
-		LOCAL_USER_REMOVE(u);
-		return -1;
-	}
+	tmp = ast_strdupa(data);
 	
 	opt = strchr(tmp, '|');
 	if (opt) {
diff --git a/apps/app_skel.c b/apps/app_skel.c
index debe358d4994ebbe1365b09ee4ea0cbafb8f4877..640d6242273722b0afead1503103ec7a3ac73778 100644
--- a/apps/app_skel.c
+++ b/apps/app_skel.c
@@ -95,10 +95,7 @@ static int app_exec(struct ast_channel *chan, void *data)
 	/* Do our thing here */
 
 	/* We need to make a copy of the input string if we are going to modify it! */
-	if (!(parse = ast_strdupa(data))) {
-		LOCAL_USER_REMOVE(u);
-		return -1;
-	}
+	parse = ast_strdupa(data);
 
 	AST_STANDARD_APP_ARGS(args, parse);
 
diff --git a/apps/app_speech_utils.c b/apps/app_speech_utils.c
index 6404c1b6d6ee5502034de1372ac4199044ce9309..8b1194c397fb671a904013e4e7a9e5346bf027f8 100644
--- a/apps/app_speech_utils.c
+++ b/apps/app_speech_utils.c
@@ -327,8 +327,7 @@ static int speech_load(struct ast_channel *chan, void *data)
 	struct ast_speech *speech = find_speech(chan);
 	char *argv[2], *args = NULL, *name = NULL, *path = NULL;
 
-	if (!(args = ast_strdupa(data)))
-                return -1;
+	args = ast_strdupa(data);
 
 	LOCAL_USER_ADD(u);
 
@@ -504,8 +503,7 @@ static int speech_background(struct ast_channel *chan, void *data)
         struct ast_datastore *datastore = NULL;
         char *argv[2], *args = NULL, *filename = NULL, tmp[2] = "";
 
-        if (!(args = ast_strdupa(data)))
-                return -1;
+        args = ast_strdupa(data);
 
         LOCAL_USER_ADD(u);
 
diff --git a/apps/app_stack.c b/apps/app_stack.c
index 1734f03117d08784f3dd6a9bd2e54c004eca8e32..4d21d0f8cca1d286af877c3f35630723ff09c533 100644
--- a/apps/app_stack.c
+++ b/apps/app_stack.c
@@ -130,8 +130,7 @@ static int gosubif_exec(struct ast_channel *chan, void *data)
 		return 0;
 	}
 
-	if (!(args = ast_strdupa(data)))
-		return -1;
+	args = ast_strdupa(data);
 
 	LOCAL_USER_ADD(u);
 
diff --git a/apps/app_talkdetect.c b/apps/app_talkdetect.c
index dadde6a0266daf5dd9f03b0ffffa7bbc87ea5ca0..c08f929a033f7a8183ee11c0b4d9ad701ed3c466 100644
--- a/apps/app_talkdetect.c
+++ b/apps/app_talkdetect.c
@@ -86,10 +86,7 @@ static int background_detect_exec(struct ast_channel *chan, void *data)
 
 	LOCAL_USER_ADD(u);
 
-	if (!(tmp = ast_strdupa(data))) {
-		LOCAL_USER_REMOVE(u);
-		return -1;
-	}	
+	tmp = ast_strdupa(data);
 
 	stringp=tmp;
 	strsep(&stringp, "|");
diff --git a/apps/app_transfer.c b/apps/app_transfer.c
index 8bd046097301a86eb1887db200d17f28721751fe..81d8f2cad41d2a907be210f45a2e4c15c647bb8c 100644
--- a/apps/app_transfer.c
+++ b/apps/app_transfer.c
@@ -89,12 +89,8 @@ static int transfer_exec(struct ast_channel *chan, void *data)
 		LOCAL_USER_REMOVE(u);
 		pbx_builtin_setvar_helper(chan, "TRANSFERSTATUS", "FAILURE");
 		return 0;
-	} else {
-		if (!(parse = ast_strdupa(data))) {
-			LOCAL_USER_REMOVE(u);
-			return -1;
-		}
-	}
+	} else
+		parse = ast_strdupa(data);
 
 	AST_STANDARD_APP_ARGS(args, parse);
 
diff --git a/apps/app_url.c b/apps/app_url.c
index 7d34d9d9bc0b70271548f07e697c2e691b51726d..c46d8f0db0d33cc66aeb61c712fe189054d2daa1 100644
--- a/apps/app_url.c
+++ b/apps/app_url.c
@@ -92,10 +92,7 @@ static int sendurl_exec(struct ast_channel *chan, void *data)
 
 	LOCAL_USER_ADD(u);
 
-	if (!(tmp = ast_strdupa(data))) {
-		LOCAL_USER_REMOVE(u);
-		return -1;
-	}
+	tmp = ast_strdupa(data);
 
 	stringp=tmp;
 	strsep(&stringp, "|");
diff --git a/apps/app_userevent.c b/apps/app_userevent.c
index c476c71fea5edf822e9d03f3767ed4c8cb6268a7..8d2586779b0b25fc2b2c159252cce8b93e60abbb 100644
--- a/apps/app_userevent.c
+++ b/apps/app_userevent.c
@@ -72,10 +72,7 @@ static int userevent_exec(struct ast_channel *chan, void *data)
 
 	LOCAL_USER_ADD(u);
 
-	if (!(info = ast_strdupa(data))) {
-		LOCAL_USER_REMOVE(u);
-		return -1;
-	}
+	info = ast_strdupa(data);
 
 	snprintf(eventname, sizeof(eventname), "UserEvent%s", info);
 	eventbody = strchr(eventname, '|');
diff --git a/apps/app_verbose.c b/apps/app_verbose.c
index 02d49af6278cd427c4337606c5e5229aa5dee50c..e4ee8f0686f4f3929f22846d559beeb40626f0ca 100644
--- a/apps/app_verbose.c
+++ b/apps/app_verbose.c
@@ -65,34 +65,34 @@ static int verbose_exec(struct ast_channel *chan, void *data)
 	LOCAL_USER_ADD(u);
 
 	if (data) {
-		if ((vtext = ast_strdupa(data))) {
-			char *tmp = strsep(&vtext, "|");
-			if (vtext) {
-				if (sscanf(tmp, "%d", &vsize) != 1) {
-					vsize = 0;
-					ast_log(LOG_WARNING, "'%s' is not a verboser number\n", vtext);
-				}
-			} else {
-				vtext = tmp;
+		char *tmp;
+		vtext = ast_strdupa(data);
+		tmp = strsep(&vtext, "|");
+		if (vtext) {
+			if (sscanf(tmp, "%d", &vsize) != 1) {
 				vsize = 0;
+				ast_log(LOG_WARNING, "'%s' is not a verboser number\n", vtext);
 			}
-			if (option_verbose >= vsize) {
-				switch (vsize) {
-				case 0:
-					ast_verbose("%s\n", vtext);
-					break;
-				case 1:
-					ast_verbose(VERBOSE_PREFIX_1 "%s\n", vtext);
-					break;
-				case 2:
-					ast_verbose(VERBOSE_PREFIX_2 "%s\n", vtext);
-					break;
-				case 3:
-					ast_verbose(VERBOSE_PREFIX_3 "%s\n", vtext);
-					break;
-				default:
-					ast_verbose(VERBOSE_PREFIX_4 "%s\n", vtext);
-				}
+		} else {
+			vtext = tmp;
+			vsize = 0;
+		}
+		if (option_verbose >= vsize) {
+			switch (vsize) {
+			case 0:
+				ast_verbose("%s\n", vtext);
+				break;
+			case 1:
+				ast_verbose(VERBOSE_PREFIX_1 "%s\n", vtext);
+				break;
+			case 2:
+				ast_verbose(VERBOSE_PREFIX_2 "%s\n", vtext);
+				break;
+			case 3:
+				ast_verbose(VERBOSE_PREFIX_3 "%s\n", vtext);
+				break;
+			default:
+				ast_verbose(VERBOSE_PREFIX_4 "%s\n", vtext);
 			}
 		}
 	}
@@ -115,10 +115,7 @@ static int log_exec(struct ast_channel *chan, void *data)
 		return 0;
 	}
 
-	if (!(ltext = ast_strdupa(data))) {
-		LOCAL_USER_REMOVE(u);
-		return 0;
-	}
+	ltext = ast_strdupa(data);
 
 	level = strsep(&ltext, "|");
 
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 9b3d2ad274dfcef9d0c173bcfcaa0a9f090e6d6e..e718853dd89d2fd166ecc48fbdaf4396c07314af 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -3368,25 +3368,24 @@ static int notify_new_message(struct ast_channel *chan, struct ast_vm_user *vmu,
 	}
 
 	/* Attach only the first format */
-	if ((fmt = ast_strdupa(fmt))) {
-		stringp = fmt;
-		strsep(&stringp, "|");
+	fmt = ast_strdupa(fmt);
+	stringp = fmt;
+	strsep(&stringp, "|");
 
-		if (!ast_strlen_zero(vmu->email)) {
-			int attach_user_voicemail = ast_test_flag((&globalflags), VM_ATTACH);
-			char *myserveremail = serveremail;
-			attach_user_voicemail = ast_test_flag(vmu, VM_ATTACH);
-			if (!ast_strlen_zero(vmu->serveremail))
-				myserveremail = vmu->serveremail;
-			sendmail(myserveremail, vmu, msgnum, vmu->context, vmu->mailbox, cidnum, cidname, fn, fmt, duration, attach_user_voicemail, category);
-		}
+	if (!ast_strlen_zero(vmu->email)) {
+		int attach_user_voicemail = ast_test_flag((&globalflags), VM_ATTACH);
+		char *myserveremail = serveremail;
+		attach_user_voicemail = ast_test_flag(vmu, VM_ATTACH);
+		if (!ast_strlen_zero(vmu->serveremail))
+			myserveremail = vmu->serveremail;
+		sendmail(myserveremail, vmu, msgnum, vmu->context, vmu->mailbox, cidnum, cidname, fn, fmt, duration, attach_user_voicemail, category);
+	}
 
-		if (!ast_strlen_zero(vmu->pager)) {
-			char *myserveremail = serveremail;
-			if (!ast_strlen_zero(vmu->serveremail))
-				myserveremail = vmu->serveremail;
-			sendpage(myserveremail, vmu->pager, msgnum, vmu->context, vmu->mailbox, cidnum, cidname, duration, vmu, category);
-		}
+	if (!ast_strlen_zero(vmu->pager)) {
+		char *myserveremail = serveremail;
+		if (!ast_strlen_zero(vmu->serveremail))
+			myserveremail = vmu->serveremail;
+		sendpage(myserveremail, vmu->pager, msgnum, vmu->context, vmu->mailbox, cidnum, cidname, duration, vmu, category);
 	}
 
 	if (ast_test_flag(vmu, VM_DELETE)) {
@@ -5356,10 +5355,7 @@ static int vm_execmain(struct ast_channel *chan, void *data)
 			AST_APP_ARG(argv1);
 		);
 				        
-		if (!(parse = ast_strdupa(data))) {
-			LOCAL_USER_REMOVE(u);
-			return -1;
-		}
+		parse = ast_strdupa(data);
 
 		AST_STANDARD_APP_ARGS(args, parse);
 
@@ -5826,12 +5822,7 @@ static int vm_exec(struct ast_channel *chan, void *data)
 		ast_answer(chan);
 
 	if (!ast_strlen_zero(data)) {
-		tmp = ast_strdupa((char *)data);
-		if (!tmp) {
-			ast_log(LOG_ERROR, "Out of memory\n");
-			LOCAL_USER_REMOVE(u);
-			return -1;
-		}
+		tmp = ast_strdupa(data);
 		AST_STANDARD_APP_ARGS(args, tmp);
 		if (args.argc == 2) {
 			if (ast_app_parse_options(vm_app_options, &flags, opts, args.argv1)) {
@@ -5958,10 +5949,7 @@ static int vm_box_exists(struct ast_channel *chan, void *data)
 
 	LOCAL_USER_ADD(u);
 
-	if (!(box = ast_strdupa(data))) {
-		LOCAL_USER_REMOVE(u);
-		return -1;
-	}
+	box = ast_strdupa(data);
 
 	AST_STANDARD_APP_ARGS(args, box);
 
@@ -5998,8 +5986,7 @@ static int vmauthenticate(struct ast_channel *chan, void *data)
 	LOCAL_USER_ADD(u);
 	
 	if (s) {
-		if (!(s = ast_strdupa(s)))
-			return -1;
+		s = ast_strdupa(s);
 		user = strsep(&s, "|");
 		options = strsep(&s, "|");
 		if (user) {
@@ -6471,24 +6458,21 @@ static int load_config(void)
 						struct vm_zone *z;
 						if ((z = ast_malloc(sizeof(*z)))) {
 							char *msg_format, *timezone;
-							if ((msg_format = ast_strdupa(var->value))) {
-								timezone = strsep(&msg_format, "|");
-								if (msg_format) {
-									ast_copy_string(z->name, var->name, sizeof(z->name));
-									ast_copy_string(z->timezone, timezone, sizeof(z->timezone));
-									ast_copy_string(z->msg_format, msg_format, sizeof(z->msg_format));
-									AST_LIST_LOCK(&zones);
-									AST_LIST_INSERT_HEAD(&zones, z, list);
-									AST_LIST_UNLOCK(&zones);
-								} else {
-									ast_log(LOG_WARNING, "Invalid timezone definition at line %d\n", var->lineno);
-									free(z);
-								}
+							msg_format = ast_strdupa(var->value);
+							timezone = strsep(&msg_format, "|");
+							if (msg_format) {
+								ast_copy_string(z->name, var->name, sizeof(z->name));
+								ast_copy_string(z->timezone, timezone, sizeof(z->timezone));
+								ast_copy_string(z->msg_format, msg_format, sizeof(z->msg_format));
+								AST_LIST_LOCK(&zones);
+								AST_LIST_INSERT_HEAD(&zones, z, list);
+								AST_LIST_UNLOCK(&zones);
 							} else {
+								ast_log(LOG_WARNING, "Invalid timezone definition at line %d\n", var->lineno);
 								free(z);
-								return -1;
 							}
-						} else {						
+						} else {
+							free(z);
 							return -1;
 						}
 						var = var->next;
diff --git a/apps/app_while.c b/apps/app_while.c
index 754154e8de384defb3b6aad2462167159d047661..04b0a5c8f898a0d5a4f507c0d7de7d722662ed6f 100644
--- a/apps/app_while.c
+++ b/apps/app_while.c
@@ -202,9 +202,8 @@ static int _while_exec(struct ast_channel *chan, void *data, int end)
 	snprintf(used_index, VAR_SIZE, "%d", used_index_i);
 	snprintf(new_index, VAR_SIZE, "%d", used_index_i + 1);
 	
-	if (!end) {
-		condition = ast_strdupa((char *) data);
-	}
+	if (!end)
+		condition = ast_strdupa(data);
 
 	size = strlen(chan->context) + strlen(chan->exten) + 32;
 	my_name = alloca(size);
diff --git a/apps/app_zapras.c b/apps/app_zapras.c
index d75d2ee7c754f34f402bb2f934596d8e4f94d0b3..ce1e3828b346a4a071460fda14b1a7d3145fc6cd 100644
--- a/apps/app_zapras.c
+++ b/apps/app_zapras.c
@@ -215,10 +215,7 @@ static int zapras_exec(struct ast_channel *chan, void *data)
 
 	LOCAL_USER_ADD(u);
 
-	if (!(args = ast_strdupa(data))) {
-		LOCAL_USER_REMOVE(u);
-		return -1;
-	}
+	args = ast_strdupa(data);
 	
 	/* Answer the channel if it's not up */
 	if (chan->_state != AST_STATE_UP)
diff --git a/apps/app_zapscan.c b/apps/app_zapscan.c
index c8e0d75dde533e4c48846a8cdb3916b466179a5e..17af23bb34c8e89fd9c52eaa1f06298c7a52f0e0 100644
--- a/apps/app_zapscan.c
+++ b/apps/app_zapscan.c
@@ -307,7 +307,7 @@ static int conf_exec(struct ast_channel *chan, void *data)
 	if (chan->_state != AST_STATE_UP)
 		ast_answer(chan);
 	
-	desired_group = ast_strdupa((char *) data);
+	desired_group = ast_strdupa(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/callerid.c b/callerid.c
index 58891d0fab0aa5bd33f2baac6154af44a4ec65aa..b883926911e8cadb98115be6c608a50d387577d7 100644
--- a/callerid.c
+++ b/callerid.c
@@ -1029,11 +1029,6 @@ int ast_callerid_split(const char *buf, char *name, int namelen, char *num, int
 	char *l = NULL, *n = NULL;
 
 	tmp = ast_strdupa(buf);
-	if (!tmp) {
-		name[0] = '\0';
-		num[0] = '\0';
-		return -1;
-	}
 	ast_callerid_parse(tmp, &n, &l);
 	if (n)
 		ast_copy_string(name, n, namelen);
diff --git a/channel.c b/channel.c
index 3b79f7c3cd433b95bac459d0214e637b0df4c75f..e341ae30b1764cff95f52722ebe0d79e4f2f75cc 100644
--- a/channel.c
+++ b/channel.c
@@ -1597,11 +1597,8 @@ struct ast_channel *ast_waitfor_nandfds(struct ast_channel **c, int n, int *fds,
 	} *fdmap;
 
 	sz = n * AST_MAX_FDS + nfds;
-	if (!(pfds = alloca(sizeof(*pfds) * sz)) || !(fdmap = alloca(sizeof(*fdmap) * sz))) {
-		ast_log(LOG_ERROR, "Out of memory\n");
-		*outfd = -1;
-		return NULL;
-	}
+	pfds = alloca(sizeof(*pfds) * sz);
+	fdmap = alloca(sizeof(*fdmap) * sz);
 
 	if (outfd)
 		*outfd = -99999;
@@ -3773,8 +3770,6 @@ ast_group_t ast_get_group(char *s)
 	ast_group_t group = 0;
 
 	c = ast_strdupa(s);
-	if (!c)
-		return 0;
 	
 	while ((piece = strsep(&c, ","))) {
 		if (sscanf(piece, "%d-%d", &start, &finish) == 2) {
diff --git a/channels/chan_agent.c b/channels/chan_agent.c
index 8da8b5d9ca143c13b523cacfc56c8dc30df4cc34..c62eaf6d346a4b11179b801293eefce45c47aac0 100644
--- a/channels/chan_agent.c
+++ b/channels/chan_agent.c
@@ -294,8 +294,7 @@ static struct agent_pvt *add_agent(char *agent, int pending)
 	char *agt = NULL;
 	struct agent_pvt *p;
 
-	if (!(parse = ast_strdupa(agent)))
-		return NULL;
+	parse = ast_strdupa(agent);
 
 	/* Extract username (agt), password and name from agent (args). */
 	AST_NONSTANDARD_APP_ARGS(args, parse, ',');
@@ -1751,10 +1750,7 @@ static int __login_exec(struct ast_channel *chan, void *data, int callbackmode)
 
 	LOCAL_USER_ADD(u);
 
-	if (!(parse = ast_strdupa(data))) {
-		LOCAL_USER_REMOVE(u);
-		return -1;
-	}
+	parse = ast_strdupa(data);
 
 	AST_STANDARD_APP_ARGS(args, parse);
 
@@ -2486,8 +2482,7 @@ static int function_agent(struct ast_channel *chan, char *cmd, char *data, char
 		return -1;
 	}
 
-	if (!(parse = ast_strdupa(data)))
-		return -1;
+	parse = ast_strdupa(data);
 
 	AST_NONSTANDARD_APP_ARGS(args, parse, ':');
 	if (!args.item)
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index 8628751851e2b77c1da7e485b400d05b11ecf40b..5e69cc4cd3e26adf8868141c0ce17df0ffb8479e 100644
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -2969,12 +2969,10 @@ static int create_addr(const char *peername, struct sockaddr_in *sin, struct cre
 		char *key = NULL;
 
 		family = ast_strdupa(peer->dbsecret);
-		if (family) {
-			key = strchr(family, '/');
-			if (key)
-				*key++ = '\0';
-		}
-		if (!family || !key || ast_db_get(family, key, cai->secret, sizeof(cai->secret))) {
+		key = strchr(family, '/');
+		if (key)
+			*key++ = '\0';
+		if (!key || ast_db_get(family, key, cai->secret, sizeof(cai->secret))) {
 			ast_log(LOG_WARNING, "Unable to retrieve database password for family/key '%s'!\n", peer->dbsecret);
 			if (ast_test_flag(peer, IAX_TEMPONLY))
 				destroy_peer(peer);
@@ -4078,7 +4076,7 @@ static int decrypt_frame(int callno, struct ast_iax2_full_hdr *fh, struct ast_fr
 		
 		tmppw = ast_strdupa(iaxs[callno]->secret);
 		stringp = tmppw;
-		while((tmppw = strsep(&stringp, ";"))) {
+		while ((tmppw = strsep(&stringp, ";"))) {
 			MD5Init(&md5);
 			MD5Update(&md5, (unsigned char *)iaxs[callno]->challenge, strlen(iaxs[callno]->challenge));
 			MD5Update(&md5, (unsigned char *)tmppw, strlen(tmppw));
@@ -5132,14 +5130,12 @@ static int check_access(int callno, struct sockaddr_in *sin, struct iax_ies *ies
 		if (!ast_strlen_zero(user->dbsecret)) {
 			char *family, *key=NULL;
 			family = ast_strdupa(user->dbsecret);
-			if (family) {
-				key = strchr(family, '/');
-				if (key) {
-					*key = '\0';
-					key++;
-				}
+			key = strchr(family, '/');
+			if (key) {
+				*key = '\0';
+				key++;
 			}
-			if (!family || !key || ast_db_get(family, key, iaxs[callno]->secret, sizeof(iaxs[callno]->secret))) {
+			if (!key || ast_db_get(family, key, iaxs[callno]->secret, sizeof(iaxs[callno]->secret))) {
 				ast_log(LOG_WARNING, "Unable to retrieve database password for family/key '%s'!\n", user->dbsecret);
 				if (ast_test_flag(user, IAX_TEMPONLY)) {
 					destroy_user(user);
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 1573a0efbff11b34d84302c13e61fa3457062760..1f0848a332c3452eebd8f2c5213b4140a39d0308 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -2088,12 +2088,10 @@ static int create_addr_from_peer(struct sip_pvt *r, struct sip_peer *peer)
 		char *tmpcall;
 		char *c;
 		tmpcall = ast_strdupa(r->callid);
-		if (tmpcall) {
-			c = strchr(tmpcall, '@');
-			if (c) {
-				*c = '\0';
-				ast_string_field_build(r, callid, "%s@%s", tmpcall, peer->fromdomain);
-			}
+		c = strchr(tmpcall, '@');
+		if (c) {
+			*c = '\0';
+			ast_string_field_build(r, callid, "%s@%s", tmpcall, peer->fromdomain);
 		}
 	}
 	if (ast_strlen_zero(r->tohost)) {
@@ -6986,21 +6984,21 @@ static int get_refer_info(struct sip_pvt *sip_pvt, struct sip_request *outgoing_
 	if (!req)
 		req = &sip_pvt->initreq;
 
-	if (!( (p_refer_to = get_header(req, "Refer-To")) && (h_refer_to = ast_strdupa(p_refer_to)) )) {
+	if (!(p_refer_to = get_header(req, "Refer-To"))) {
 		ast_log(LOG_WARNING, "No Refer-To Header That's illegal\n");
 		return -1;
 	}
-
+	h_refer_to = ast_strdupa(p_refer_to);
 	refer_to = get_in_brackets(h_refer_to);
 
-	if (!( (p_referred_by = get_header(req, "Referred-By")) && (h_referred_by = ast_strdupa(p_referred_by)) )) {
-		ast_log(LOG_WARNING, "No Referrred-By Header That's not illegal\n");
+	if (!(p_referred_by = get_header(req, "Referred-By"))) {
+		ast_log(LOG_DEBUG, "No Referrred-By Header That's not illegal\n");
 		return -1;
-	} else {
-		if (pedanticsipchecking)
-			ast_uri_decode(h_referred_by);
-		referred_by = get_in_brackets(h_referred_by);
 	}
+	h_referred_by = ast_strdupa(p_referred_by);
+	if (pedanticsipchecking)
+		ast_uri_decode(h_referred_by);
+	referred_by = get_in_brackets(h_referred_by);
 	h_contact = get_header(req, "Contact");
 	
 	if (strncmp(refer_to, "sip:", 4)) {
@@ -7327,13 +7325,9 @@ static int check_user_full(struct sip_pvt *p, struct sip_request *req, int sipme
 		if ((c = strchr(of, ':')))
 			*c = '\0';
 		tmp = ast_strdupa(of);
-		if (tmp) {
-			if (ast_is_shrinkable_phonenumber(tmp))
-				ast_shrink_phone_number(tmp);
-			ast_string_field_set(p, cid_num, tmp);
-		} else {
-			ast_string_field_set(p, cid_num, of);
-		}
+		if (ast_is_shrinkable_phonenumber(tmp))
+			ast_shrink_phone_number(tmp);
+		ast_string_field_set(p, cid_num, tmp);
 	}
 	if (ast_strlen_zero(of))
 		return 0;
@@ -7359,13 +7353,9 @@ static int check_user_full(struct sip_pvt *p, struct sip_request *req, int sipme
 			if (*calleridname)
 				ast_string_field_set(p, cid_name, calleridname);
 			tmp = ast_strdupa(rpid_num);
-			if (tmp) {
-				if (ast_is_shrinkable_phonenumber(tmp))
-					ast_shrink_phone_number(tmp);
-				ast_string_field_set(p, cid_num, tmp);
-			} else {
-				ast_string_field_set(p, cid_num, rpid_num);
-			}
+			if (ast_is_shrinkable_phonenumber(tmp))
+				ast_shrink_phone_number(tmp);
+			ast_string_field_set(p, cid_num, tmp);
 		}
 
 		
@@ -7396,13 +7386,9 @@ static int check_user_full(struct sip_pvt *p, struct sip_request *req, int sipme
 				ast_string_field_set(p, context, user->context);
 			if (!ast_strlen_zero(user->cid_num) && !ast_strlen_zero(p->cid_num)) {
 				char *tmp = ast_strdupa(user->cid_num);
-				if (tmp) {
-					if (ast_is_shrinkable_phonenumber(tmp))
-						ast_shrink_phone_number(tmp);
-					ast_string_field_set(p, cid_num, tmp);
-				} else {
-					ast_string_field_set(p, cid_num, user->cid_num);
-				}
+				if (ast_is_shrinkable_phonenumber(tmp))
+					ast_shrink_phone_number(tmp);
+				ast_string_field_set(p, cid_num, tmp);
 			}
 			if (!ast_strlen_zero(user->cid_name) && !ast_strlen_zero(p->cid_num))
 				ast_string_field_set(p, cid_name, user->cid_name);
@@ -7473,13 +7459,9 @@ static int check_user_full(struct sip_pvt *p, struct sip_request *req, int sipme
 				char *tmp = ast_strdupa(rpid_num);
 				if (*calleridname)
 					ast_string_field_set(p, cid_name, calleridname);
-				if (tmp) {
-					if (ast_is_shrinkable_phonenumber(tmp))
-						ast_shrink_phone_number(tmp);
-					ast_string_field_set(p, cid_num, tmp);
-				} else {
-					ast_string_field_set(p, cid_num, rpid_num);
-				}
+				if (ast_is_shrinkable_phonenumber(tmp))
+					ast_shrink_phone_number(tmp);
+				ast_string_field_set(p, cid_num, tmp);
 			}
 			usenatroute = ast_test_flag(&p->flags[0], SIP_NAT_ROUTE);
 			if (p->rtp) {
@@ -7529,13 +7511,9 @@ static int check_user_full(struct sip_pvt *p, struct sip_request *req, int sipme
 				}
 				if (!ast_strlen_zero(peer->cid_num) && !ast_strlen_zero(p->cid_num)) {
 					char *tmp = ast_strdupa(peer->cid_num);
-					if (tmp) {
-						if (ast_is_shrinkable_phonenumber(tmp))
-							ast_shrink_phone_number(tmp);
-						ast_string_field_set(p, cid_num, tmp);
-					} else {
-						ast_string_field_set(p, cid_num, peer->cid_num);
-					}
+					if (ast_is_shrinkable_phonenumber(tmp))
+						ast_shrink_phone_number(tmp);
+					ast_string_field_set(p, cid_num, tmp);
 				}
 				if (!ast_strlen_zero(peer->cid_name) && !ast_strlen_zero(p->cid_name)) 
 					ast_string_field_set(p, cid_name, peer->cid_name);
@@ -12740,7 +12718,7 @@ static struct sip_user *build_user(const char *name, struct ast_variable *v, int
 			ast_copy_string(user->subscribecontext, v->value, sizeof(user->subscribecontext));
 		} else if (!strcasecmp(v->name, "setvar")) {
 			varname = ast_strdupa(v->value);
-			if (varname && (varval = strchr(varname,'='))) {
+			if ((varval = strchr(varname,'='))) {
 				*varval++ = '\0';
 				if ((tmpvar = ast_variable_new(varname, varval))) {
 					tmpvar->next = user->chanvars;
@@ -13054,7 +13032,7 @@ static struct sip_peer *build_peer(const char *name, struct ast_variable *v, int
 		} else if (!strcasecmp(v->name, "setvar")) {
 			/* Set peer channel variable */
 			varname = ast_strdupa(v->value);
-			if (varname && (varval = strchr(varname,'='))) {
+			if ((varval = strchr(varname, '='))) {
 				*varval++ = '\0';
 				if ((tmpvar = ast_variable_new(varname, varval))) {
 					tmpvar->next = peer->chanvars;
@@ -13746,8 +13724,7 @@ static int sip_sipredirect(struct sip_pvt *p, const char *dest)
 	char *extension, *host, *port;
 	char tmp[80];
 	
-	if (!(cdest = ast_strdupa(dest)))
-		return 0;
+	cdest = ast_strdupa(dest);
 	
 	extension = strsep(&cdest, "@");
 	host = strsep(&cdest, ":");
@@ -13776,11 +13753,9 @@ static int sip_sipredirect(struct sip_pvt *p, const char *dest)
 				ast_log(LOG_ERROR, "Can't find the host address\n");
 				return 0;
 			}
-			if (!(host = ast_strdupa(lhost)))
-				return 0;
+			host = ast_strdupa(lhost);
 			if (!ast_strlen_zero(lport)) {
-				if (!(port = ast_strdupa(lport)))
-					return 0;
+				port = ast_strdupa(lport);
 			}
 		}
 	}
diff --git a/dsp.c b/dsp.c
index a11f272c8f798bda19618c50e88f6f49f3b8b3c5..9adddaad1ab7a2fb94b16f879efee6c5cb693ecf 100644
--- a/dsp.c
+++ b/dsp.c
@@ -1444,19 +1444,13 @@ struct ast_frame *ast_dsp_process(struct ast_channel *chan, struct ast_dsp *dsp,
 		len = af->datalen / 2;
 		break;
 	case AST_FORMAT_ULAW:
-		if (!(shortdata = alloca(af->datalen * 2))) {
-			ast_log(LOG_WARNING, "Unable to allocate stack space for data: %s\n", strerror(errno));
-			return af;
-		}
-		for (x=0;x<len;x++) 
+		shortdata = alloca(af->datalen * 2);
+		for (x = 0;x < len; x++) 
 			shortdata[x] = AST_MULAW(odata[x]);
 		break;
 	case AST_FORMAT_ALAW:
-		if (!(shortdata = alloca(af->datalen * 2))) {
-			ast_log(LOG_WARNING, "Unable to allocate stack space for data: %s\n", strerror(errno));
-			return af;
-		}
-		for (x=0;x<len;x++) 
+		shortdata = alloca(af->datalen * 2);
+		for (x = 0; x < len; x++) 
 			shortdata[x] = AST_ALAW(odata[x]);
 		break;
 	default:
diff --git a/funcs/func_cut.c b/funcs/func_cut.c
index a4bce49c1b75ed6229e6dc2c1010a4108f23ae86..4d3a85f3d36594bfd501c4eb58097e1bb1f81d37 100644
--- a/funcs/func_cut.c
+++ b/funcs/func_cut.c
@@ -78,8 +78,7 @@ static int sort_internal(struct ast_channel *chan, char *data, char *buffer, siz
 	if (!data)
 		return ERROR_NOARG;
 
-	if (!(strings = ast_strdupa(data)))
-		return ERROR_NOMEM;
+	strings = ast_strdupa(data);
 
 	for (ptrkey = strings; *ptrkey; ptrkey++) {
 		if (*ptrkey == '|')
@@ -87,8 +86,6 @@ static int sort_internal(struct ast_channel *chan, char *data, char *buffer, siz
 	}
 
 	sortable_keys = alloca(count * sizeof(struct sortable_keys));
-	if (!sortable_keys)
-		return ERROR_NOMEM;
 
 	memset(sortable_keys, 0, count * sizeof(struct sortable_keys));
 
@@ -132,8 +129,7 @@ static int cut_internal(struct ast_channel *chan, char *data, char *buffer, size
 
 	memset(buffer, 0, buflen); 
 	
-	if (!(parse = ast_strdupa(data)))
-		return ERROR_NOMEM;
+	parse = ast_strdupa(data);
 
 	AST_STANDARD_APP_ARGS(args, parse);
 
diff --git a/include/asterisk/utils.h b/include/asterisk/utils.h
index 134caa8dcf79cf1c17f2338b6f404f7044a96358..4f563be544716bb6c61688c898f5b055af04e5d3 100644
--- a/include/asterisk/utils.h
+++ b/include/asterisk/utils.h
@@ -437,12 +437,7 @@ char * __attribute__((malloc)) _ast_strndup(const char *str, size_t len, const c
 		const char *__old = (s);                                  \
 		size_t __len = strlen(__old) + 1;                         \
 		char *__new = __builtin_alloca(__len);                    \
-		if (__builtin_expect(!__new, 0))                          \
-			ast_log(LOG_ERROR, "Stack Allocation Error in"    \
-				"function '%s' at line '%d' of '%s'!\n",  \
-				__PRETTY_FUNCTION__, __LINE__, __FILE__); \
-		else                                                      \
-			memcpy (__new, __old, __len);                     \
+		memcpy (__new, __old, __len);                             \
 		__new;                                                    \
 	}))
 #endif
diff --git a/indications.c b/indications.c
index 93cc6c25c5f51207ef2ecd56fee3b7c5feb8ad43..7dc1a05bb0492f61c4eba97fa452b938dab2a2e6 100644
--- a/indications.c
+++ b/indications.c
@@ -213,10 +213,9 @@ int ast_playtones_start(struct ast_channel *chan, int vol, const char *playlst,
 {
 	char *s, *data = ast_strdupa(playlst); /* cute */
 	struct playtones_def d = { vol, -1, 0, 1, NULL};
-	char *stringp=NULL;
+	char *stringp;
 	char *separator;
-	if (!data)
-		return -1;
+	
 	if (vol < 1)
 		d.vol = 7219; /* Default to -8db */
 
diff --git a/loader.c b/loader.c
index dd3e1afe8f638d8cee04ab62b5d31cf45b0d241a..c09673d692b131e0d11b91793497ab89498598a4 100644
--- a/loader.c
+++ b/loader.c
@@ -647,8 +647,7 @@ static void *find_symbol(struct module *m, const char *name, int verbose)
 
 	if (name[0] == '_')
 		name++;
-	if (!(n1 = alloca(strlen(name) + 2))) /* room for leading '_' and final '\0' */
-		return NULL;
+	n1 = alloca(strlen(name) + 2); /* room for leading '_' and final '\0' */
 	n1[0] = '_';
 	strcpy(n1+1, name);
 	s = dlsym(m->lib, n1+1);	/* try without '_' */
diff --git a/logger.c b/logger.c
index ff3513634a7e3c68718855419cebb32c85864d8f..522a96b2d88e89e6c1bf17acd1f87e27585d2b91 100644
--- a/logger.c
+++ b/logger.c
@@ -861,10 +861,7 @@ void ast_verbose(const char *fmt, ...)
 		time(&t);
 		localtime_r(&t, &tm);
 		strftime(date, sizeof(date), dateformat, &tm);
-		if ((datefmt = alloca(strlen(date) + 3 + strlen(fmt) + 1))) {
-			sprintf(datefmt, "[%s] %s", date, fmt);
-			fmt = datefmt;
-		}
+		datefmt = alloca(strlen(date) + 3 + strlen(fmt) + 1);
 	}
 
 	/* this lock is also protecting against multiple threads
diff --git a/manager.c b/manager.c
index db61e28e53651973cb7afa5637d2bc5dd92ee324..d096c068972d3790cfc4d8ab312b390ca34b3299 100644
--- a/manager.c
+++ b/manager.c
@@ -588,8 +588,7 @@ struct ast_variable *astman_get_variables(struct message *m)
 		if (strncasecmp("Variable: ", m->headers[x], varlen))
 			continue;
 
-		if (!(parse = ast_strdupa(m->headers[x] + varlen)))
-			return head;
+		parse = ast_strdupa(m->headers[x] + varlen);
 
 		AST_STANDARD_APP_ARGS(args, parse);
 		if (args.argc) {
diff --git a/netsock.c b/netsock.c
index a7799e9675b2b712e4c752dd29052e8e00b51ef4..7c77e93159a64cbed3ef57c0aaa6ad2824bf45fe 100644
--- a/netsock.c
+++ b/netsock.c
@@ -186,10 +186,6 @@ struct ast_netsock *ast_netsock_bind(struct ast_netsock_list *list, struct io_co
 	sin.sin_family = AF_INET;
 	sin.sin_port = htons(defaultport);
 	tmp = ast_strdupa(bindinfo);
-	if (!tmp) {
-		ast_log(LOG_WARNING, "Out of memory!\n");
-		return NULL;
-	}
 
 	host = strsep(&tmp, ":");
 	port = tmp;
diff --git a/pbx.c b/pbx.c
index 24aa3febde6f5de2c5978e13bc636c98739c8539..a29178af320fbe6c432b1587f9de047a5859c3ac 100644
--- a/pbx.c
+++ b/pbx.c
@@ -4989,8 +4989,7 @@ static int pbx_builtin_resetcdr(struct ast_channel *chan, void *data)
 	struct ast_flags flags = { 0 };
 
 	if (!ast_strlen_zero(data)) {
-		if (!(args = ast_strdupa(data)))
-			return -1;
+		args = ast_strdupa(data);
 		ast_app_parse_options(resetcdr_opts, &flags, NULL, args);
 	}
 
@@ -5034,16 +5033,15 @@ static int pbx_builtin_gotoiftime(struct ast_channel *chan, void *data)
 		return -1;
 	}
 
-	if ((s = ast_strdupa(data))) {
-		ts = s;
+	ts = s = ast_strdupa(data);
 
-		/* Separate the Goto path */
-		strsep(&ts,"?");
+	/* Separate the Goto path */
+	strsep(&ts,"?");
 
-		/* struct ast_include include contained garbage here, fixed by zeroing it on get_timerange */
-		if (ast_build_timing(&timing, s) && ast_check_timing(&timing))
-			res = pbx_builtin_goto(chan, (void *)ts);
-	}
+	/* struct ast_include include contained garbage here, fixed by zeroing it on get_timerange */
+	if (ast_build_timing(&timing, s) && ast_check_timing(&timing))
+		res = pbx_builtin_goto(chan, ts);
+	
 	return res;
 }
 
@@ -5062,8 +5060,7 @@ static int pbx_builtin_execiftime(struct ast_channel *chan, void *data)
 		return -1;
 	}
 
-	if (!(appname = ast_strdupa(data)))
-		return -1;
+	appname = ast_strdupa(data);
 
 	s = strsep(&appname,"?");	/* Separate the timerange and application name/data */
 	if (!appname) {	/* missing application */
@@ -5121,8 +5118,7 @@ static int pbx_builtin_waitexten(struct ast_channel *chan, void *data)
 	);
 
 	if (!ast_strlen_zero(data)) {
-		if (!(parse = ast_strdupa(data)))
-			return -1;
+		parse = ast_strdupa(data);
 		AST_STANDARD_APP_ARGS(args, parse);
 	} else
 		memset(&args, 0, sizeof(args));
@@ -5179,8 +5175,7 @@ static int pbx_builtin_background(struct ast_channel *chan, void *data)
 	if (ast_strlen_zero(data))
 		ast_log(LOG_WARNING, "Background requires an argument (filename)\n");
 
-	if (!(parse = ast_strdupa(data)))
-		return -1;
+	parse = ast_strdupa(data);
 
 	AST_STANDARD_APP_ARGS(args, parse);
 
diff --git a/pbx/pbx_dundi.c b/pbx/pbx_dundi.c
index fedbd199d0a84f56e0aeae63b03a94b3c8834920..f8f9e326fe17708dea863cb3a94b1a8675e48044 100644
--- a/pbx/pbx_dundi.c
+++ b/pbx/pbx_dundi.c
@@ -3875,8 +3875,7 @@ static void build_mapping(char *name, char *value)
 	int x;
 	int y;
 
-	if (!(t = ast_strdupa(value)))
-		return;
+	t = ast_strdupa(value);
 		
 	AST_LIST_TRAVERSE(&mappings, map, list) {
 		/* Find a double match */
diff --git a/res/res_agi.c b/res/res_agi.c
index c4df2421e10c91b916d2c201bb0a7b59b5de3fe7..d1218e2881918b396ed8e40df8ee156bbf0adf0c 100644
--- a/res/res_agi.c
+++ b/res/res_agi.c
@@ -138,8 +138,6 @@ static int launch_netscript(char *agiurl, char *argv[], int *fds, int *efd, int
 
 	/* agiusl is "agi://host.domain[:port][/script/name]" */
 	host = ast_strdupa(agiurl + 6);	/* Remove agi:// */
-	if (!host)
-		return -1;
 	/* Strip off any script name */
 	if ((c = strchr(host, '/'))) {
 		*c = '\0';
diff --git a/res/res_clioriginate.c b/res/res_clioriginate.c
index 1c02491d223c04a2d81f4103bd8e2cba5f73d740..306975946f0862acb0167467ebdaae0d73f15470 100644
--- a/res/res_clioriginate.c
+++ b/res/res_clioriginate.c
@@ -76,8 +76,7 @@ static int orig_app(int fd, const char *chan, const char *app, const char *appda
 	if (ast_strlen_zero(app))
 		return RESULT_SHOWUSAGE;
 
-	if (!(chandata = ast_strdupa(chan)))
-		return RESULT_FAILURE;
+	chandata = ast_strdupa(chan);
 	
 	chantech = strsep(&chandata, "/");
 	if (!chandata) {
@@ -98,8 +97,7 @@ static int orig_exten(int fd, const char *chan, const char *data)
 	char *context = NULL;
 	int reason = 0;
 
-	if (!(chandata = ast_strdupa(chan)))
-		return RESULT_FAILURE;
+	chandata = ast_strdupa(chan);
 	
 	chantech = strsep(&chandata, "/");
 	if (!chandata) {
@@ -108,8 +106,7 @@ static int orig_exten(int fd, const char *chan, const char *data)
 	}
 
 	if (!ast_strlen_zero(data)) {
-		if (!(context = ast_strdupa(data)))
-			return RESULT_FAILURE;
+		context = ast_strdupa(data);
 		exten = strsep(&context, "@");
 	}
 
diff --git a/res/res_config_odbc.c b/res/res_config_odbc.c
index 31a2d1513057840c6557167742051a2aa89e9c0a..0929f741c6c39e203c8612f45b825dd8c586d96a 100644
--- a/res/res_config_odbc.c
+++ b/res/res_config_odbc.c
@@ -252,7 +252,7 @@ static struct ast_config *realtime_multi_odbc(const char *database, const char *
 		return NULL;
 	}
 	initfield = ast_strdupa(newparam);
-	if (initfield && (op = strchr(initfield, ' '))) 
+	if ((op = strchr(initfield, ' '))) 
 		*op = '\0';
 	newval = va_arg(aq, const char *);
 	if (!strchr(newparam, ' ')) op = " ="; else op = "";
diff --git a/res/res_config_pgsql.c b/res/res_config_pgsql.c
index 97d4934565d51aeb9f317dcdb1fb65d3016bec98..2e900d00de09c3e72c758f6dfbe03a7b7995e8ae 100644
--- a/res/res_config_pgsql.c
+++ b/res/res_config_pgsql.c
@@ -239,7 +239,7 @@ static struct ast_config *realtime_multi_pgsql(const char *database, const char
 	}
 
 	initfield = ast_strdupa(newparam);
-	if (initfield && (op = strchr(initfield, ' '))) {
+	if ((op = strchr(initfield, ' '))) {
 		*op = '\0';
 	}
 
diff --git a/res/res_convert.c b/res/res_convert.c
index 5530758741042ba1141e4276e6f937a776122a23..85bc7d2daf19f61f06b159de48033ddaa1017587 100644
--- a/res/res_convert.c
+++ b/res/res_convert.c
@@ -72,8 +72,8 @@ static int cli_audio_convert(int fd, int argc, char *argv[])
 		goto fail_out;	
 	}
 
-	if (!(file_in = ast_strdupa(argv[1])) || !(file_out = ast_strdupa(argv[2])))
-		goto fail_out;
+	file_in = ast_strdupa(argv[1]);
+	file_out = ast_strdupa(argv[2]);
 
 	if (split_ext(file_in, &name_in, &ext_in)) {
 		ast_cli(fd, "'%s' is an invalid filename!\n", argv[1]);
diff --git a/res/res_features.c b/res/res_features.c
index b8c1cfe5b33857c2439be776b6ac473de475c268..c5dfbcfa6f038e917a550f5349e4f165ff684e15 100644
--- a/res/res_features.c
+++ b/res/res_features.c
@@ -174,26 +174,33 @@ static void check_goto_on_transfer(struct ast_channel *chan)
 	char *x, *goto_on_transfer;
 	struct ast_frame *f;
 
-	if (!ast_strlen_zero(val) && (goto_on_transfer = ast_strdupa(val)) && (xferchan = ast_channel_alloc(0))) {
-		for (x = goto_on_transfer; x && *x; x++)
-			if (*x == '^')
-				*x = '|';
-		ast_string_field_set(xferchan, name, chan->name);
-		/* Make formats okay */
-		xferchan->readformat = chan->readformat;
-		xferchan->writeformat = chan->writeformat;
-		ast_channel_masquerade(xferchan, chan);
-		ast_parseable_goto(xferchan, goto_on_transfer);
-		xferchan->_state = AST_STATE_UP;
-		ast_clear_flag(xferchan, AST_FLAGS_ALL);	
-		xferchan->_softhangup = 0;
-		if ((f = ast_read(xferchan))) {
-			ast_frfree(f);
-			f = NULL;
-			ast_pbx_start(xferchan);
-		} else {
-			ast_hangup(xferchan);
-		}
+	if (ast_strlen_zero(val))
+		return;
+
+	goto_on_transfer = ast_strdupa(val);
+
+	if (!(xferchan = ast_channel_alloc(0)))
+		return;
+
+	for (x = goto_on_transfer; x && *x; x++) {
+		if (*x == '^')
+			*x = '|';
+	}
+	ast_string_field_set(xferchan, name, chan->name);
+	/* Make formats okay */
+	xferchan->readformat = chan->readformat;
+	xferchan->writeformat = chan->writeformat;
+	ast_channel_masquerade(xferchan, chan);
+	ast_parseable_goto(xferchan, goto_on_transfer);
+	xferchan->_state = AST_STATE_UP;
+	ast_clear_flag(xferchan, AST_FLAGS_ALL);	
+	xferchan->_softhangup = 0;
+	if ((f = ast_read(xferchan))) {
+		ast_frfree(f);
+		f = NULL;
+		ast_pbx_start(xferchan);
+	} else {
+		ast_hangup(xferchan);
 	}
 }
 
@@ -920,9 +927,6 @@ static int ast_feature_interpret(struct ast_channel *chan, struct ast_channel *p
 		char *tmp = ast_strdupa(dynamic_features);
 		char *tok;
 
-		if (!tmp)
-			return res;
-		
 		while ((tok = strsep(&tmp, "#")) != NULL) {
 			feature = find_feature(tok);
 			
@@ -966,11 +970,8 @@ static void set_config_flags(struct ast_channel *chan, struct ast_channel *peer,
 			char *tok;
 			struct ast_call_feature *feature;
 
-			if (!tmp)	/* no memory */
-				return;
-
 			/* while we have a feature */
-			while (NULL != (tok = strsep(&tmp, "#"))) {
+			while ((tok = strsep(&tmp, "#"))) {
 				if ((feature = find_feature(tok)) && ast_test_flag(feature, AST_FEATURE_FLAG_NEEDSDTMF)) {
 					if (ast_test_flag(feature, AST_FEATURE_FLAG_CALLER))
 						ast_set_flag(config, AST_BRIDGE_DTMF_CHANNEL_0);
@@ -1191,11 +1192,7 @@ int ast_bridge_call(struct ast_channel *chan,struct ast_channel *peer,struct ast
 			src = peer;
 		if (monitor_app && src) {
 			char *tmp = ast_strdupa(monitor_exec);
-			if (tmp) {
-				pbx_exec(src, monitor_app, tmp);
-			} else {
-				ast_log(LOG_ERROR, "Monitor failed: out of memory\n");
-			}
+			pbx_exec(src, monitor_app, tmp);
 		}
 	}
 	
diff --git a/res/res_monitor.c b/res/res_monitor.c
index 4f47a6512f58b2132e382094df4fbc9107bc4af9..23b2ed5ba26020c3eef47320c1e98f846c86a2b7 100644
--- a/res/res_monitor.c
+++ b/res/res_monitor.c
@@ -172,17 +172,13 @@ int ast_monitor_start(	struct ast_channel *chan, const char *format_spec,
 			seq++;
 			ast_mutex_unlock(&monitorlock);
 
-			if((channel_name = ast_strdupa(chan->name))) {
-				while((p = strchr(channel_name, '/'))) {
-					*p = '-';
-				}
-				snprintf(monitor->filename_base, FILENAME_MAX, "%s/%d-%s",
-						 ast_config_AST_MONITOR_DIR, (int)time(NULL),channel_name);
-				monitor->filename_changed = 1;
-			} else {
-				ast_log(LOG_ERROR,"Failed to allocate Memory\n");
-				return -1;
+			channel_name = ast_strdupa(chan->name);
+			while ((p = strchr(channel_name, '/'))) {
+				*p = '-';
 			}
+			snprintf(monitor->filename_base, FILENAME_MAX, "%s/%d-%s",
+					 ast_config_AST_MONITOR_DIR, (int)time(NULL), channel_name);
+			monitor->filename_changed = 1;
 		}
 
 		monitor->stop = ast_monitor_stop;
@@ -416,15 +412,13 @@ static int start_monitor_exec(struct ast_channel *chan, void *data)
 		   the following could give NULL results, but we check just to
 		   be pedantic. Reconstructing with checks for 'm' option does not
 		   work if we end up adding more options than 'm' in the future. */
-		delay = ast_strdupa((char*)data);
-		if (delay) {
-			options = strrchr(delay, '|');
-			if (options) {
-				arg = strchr(options, 'b');
-				if (arg) {
-					*arg = 'X';
-					pbx_builtin_setvar_helper(chan,"AUTO_MONITOR",delay);
-				}
+		delay = ast_strdupa(data);
+		options = strrchr(delay, '|');
+		if (options) {
+			arg = strchr(options, 'b');
+			if (arg) {
+				*arg = 'X';
+				pbx_builtin_setvar_helper(chan,"AUTO_MONITOR",delay);
 			}
 		}
 		return 0;
diff --git a/strcompat.c b/strcompat.c
index a5502c25ebaae7f49396046ca9089a0a1a771ce0..9e275881c860fa5d8efa8bdce111ba6f5984660f 100644
--- a/strcompat.c
+++ b/strcompat.c
@@ -60,8 +60,7 @@ int setenv(const char *name, const char *value, int overwrite)
 	int buflen;
 
 	buflen = strlen(name) + strlen(value) + 2;
-	if (!(buf = alloca(buflen)))
- 		return -1;
+	buf = alloca(buflen);
 
 	if (!overwrite && getenv(name))
 		return 0;