Index: apps/app_queue.c =================================================================== RCS file: /usr/cvsroot/asterisk/apps/app_queue.c,v retrieving revision 1.177 diff -u -r1.177 app_queue.c --- apps/app_queue.c 7 Nov 2005 22:01:22 -0000 1.177 +++ apps/app_queue.c 8 Nov 2005 01:56:34 -0000 @@ -2022,7 +2022,7 @@ 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 @@ } /* 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); Index: apps/app_voicemail.c =================================================================== RCS file: /usr/cvsroot/asterisk/apps/app_voicemail.c,v retrieving revision 1.263 diff -u -r1.263 app_voicemail.c --- apps/app_voicemail.c 7 Nov 2005 22:01:22 -0000 1.263 +++ apps/app_voicemail.c 8 Nov 2005 01:56:41 -0000 @@ -3658,7 +3658,7 @@ /* 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++){ Index: apps/app_zapscan.c =================================================================== RCS file: /usr/cvsroot/asterisk/apps/app_zapscan.c,v retrieving revision 1.24 diff -u -r1.24 app_zapscan.c --- apps/app_zapscan.c 6 Nov 2005 15:09:46 -0000 1.24 +++ apps/app_zapscan.c 8 Nov 2005 01:56:41 -0000 @@ -305,7 +305,8 @@ 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; } Index: channels/chan_misdn.c =================================================================== RCS file: /usr/cvsroot/asterisk/channels/chan_misdn.c,v retrieving revision 1.3 diff -u -r1.3 chan_misdn.c --- channels/chan_misdn.c 6 Nov 2005 15:09:46 -0000 1.3 +++ channels/chan_misdn.c 8 Nov 2005 01:56:43 -0000 @@ -3460,7 +3460,7 @@ 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; } @@ -3503,7 +3503,7 @@ 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; } Index: channels/chan_sip.c =================================================================== RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v retrieving revision 1.906 diff -u -r1.906 chan_sip.c --- channels/chan_sip.c 31 Oct 2005 23:38:40 -0000 1.906 +++ channels/chan_sip.c 8 Nov 2005 01:57:01 -0000 @@ -4845,14 +4845,14 @@ 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); } Index: funcs/func_cdr.c =================================================================== RCS file: /usr/cvsroot/asterisk/funcs/func_cdr.c,v retrieving revision 1.8 diff -u -r1.8 func_cdr.c --- funcs/func_cdr.c 3 Nov 2005 21:19:10 -0000 1.8 +++ funcs/func_cdr.c 8 Nov 2005 01:57:01 -0000 @@ -45,7 +45,7 @@ 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 @@ char *argv[2]; int recursive = 0; - if (!data || ast_strlen_zero(data) || !value) + if (ast_strlen_zero(data) || !value) return; mydata = ast_strdupa(data); Index: funcs/func_db.c =================================================================== RCS file: /usr/cvsroot/asterisk/funcs/func_db.c,v retrieving revision 1.8 diff -u -r1.8 func_db.c --- funcs/func_db.c 3 Nov 2005 21:19:10 -0000 1.8 +++ funcs/func_db.c 8 Nov 2005 01:57:01 -0000 @@ -49,7 +49,7 @@ char *family; char *key; - if (!data || ast_strlen_zero(data)) { + if (ast_strlen_zero(data)) { ast_log(LOG_WARNING, "DB requires an argument, DB(/)\n"); return buf; } @@ -82,7 +82,7 @@ char *family; char *key; - if (!data || ast_strlen_zero(data)) { + if (ast_strlen_zero(data)) { ast_log(LOG_WARNING, "DB requires an argument, DB(/)=\n"); return; } @@ -128,7 +128,7 @@ 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(/)\n"); return buf; } Index: funcs/func_enum.c =================================================================== RCS file: /usr/cvsroot/asterisk/funcs/func_enum.c,v retrieving revision 1.5 diff -u -r1.5 func_enum.c --- funcs/func_enum.c 24 Oct 2005 20:12:06 -0000 1.5 +++ funcs/func_enum.c 8 Nov 2005 01:57:01 -0000 @@ -64,7 +64,7 @@ int i = 0; - if (!data || ast_strlen_zero(data)) { + if (ast_strlen_zero(data)) { ast_log(LOG_WARNING, synopsis); return ""; } @@ -166,7 +166,7 @@ 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; Index: funcs/func_env.c =================================================================== RCS file: /usr/cvsroot/asterisk/funcs/func_env.c,v retrieving revision 1.5 diff -u -r1.5 func_env.c --- funcs/func_env.c 24 Oct 2005 20:12:06 -0000 1.5 +++ funcs/func_env.c 8 Nov 2005 01:57:01 -0000 @@ -50,8 +50,8 @@ 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); Index: funcs/func_groupcount.c =================================================================== RCS file: /usr/cvsroot/asterisk/funcs/func_groupcount.c,v retrieving revision 1.8 diff -u -r1.8 func_groupcount.c --- funcs/func_groupcount.c 24 Oct 2005 20:12:06 -0000 1.8 +++ funcs/func_groupcount.c 8 Nov 2005 01:57:01 -0000 @@ -102,7 +102,7 @@ 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 @@ { 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)); Index: funcs/func_logic.c =================================================================== RCS file: /usr/cvsroot/asterisk/funcs/func_logic.c,v retrieving revision 1.11 diff -u -r1.11 func_logic.c --- funcs/func_logic.c 24 Oct 2005 20:12:06 -0000 1.11 +++ funcs/func_logic.c 8 Nov 2005 01:57:01 -0000 @@ -64,7 +64,7 @@ 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(?[][:])\n"); return NULL; } @@ -104,7 +104,7 @@ 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(?[][:])\n"); return NULL; } @@ -136,7 +136,7 @@ varname = strsep(&data, "="); val = data; - if (!varname || ast_strlen_zero(varname) || !val) { + if (ast_strlen_zero(varname) || !val) { ast_log(LOG_WARNING, "Syntax SET(=[])\n"); return NULL; } Index: funcs/func_math.c =================================================================== RCS file: /usr/cvsroot/asterisk/funcs/func_math.c,v retrieving revision 1.4 diff -u -r1.4 func_math.c --- funcs/func_math.c 3 Nov 2005 21:19:10 -0000 1.4 +++ funcs/func_math.c 8 Nov 2005 01:57:02 -0000 @@ -78,7 +78,7 @@ char *mvalue1, *mvalue2=NULL, *mtype_of_result; - if (!data || ast_strlen_zero(data)) { + if (ast_strlen_zero(data)) { ast_log(LOG_WARNING, "Syntax: Math([,]) - missing argument!\n"); return NULL; } Index: funcs/func_md5.c =================================================================== RCS file: /usr/cvsroot/asterisk/funcs/func_md5.c,v retrieving revision 1.7 diff -u -r1.7 func_md5.c --- funcs/func_md5.c 3 Nov 2005 21:19:10 -0000 1.7 +++ funcs/func_md5.c 8 Nov 2005 01:57:02 -0000 @@ -40,7 +40,7 @@ { char md5[33]; - if (!data || ast_strlen_zero(data)) { + if (ast_strlen_zero(data)) { ast_log(LOG_WARNING, "Syntax: MD5() - missing argument!\n"); return NULL; } Index: funcs/func_strings.c =================================================================== RCS file: /usr/cvsroot/asterisk/funcs/func_strings.c,v retrieving revision 1.12 diff -u -r1.12 func_strings.c --- funcs/func_strings.c 24 Oct 2005 20:12:06 -0000 1.12 +++ funcs/func_strings.c 8 Nov 2005 01:57:02 -0000 @@ -160,7 +160,7 @@ 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 @@ { memset(buf, 0, len); - if (!data || ast_strlen_zero(data)) { + if (ast_strlen_zero(data)) { ast_log(LOG_WARNING, "EVAL requires an argument: EVAL()\n"); return buf; } Index: funcs/func_uri.c =================================================================== RCS file: /usr/cvsroot/asterisk/funcs/func_uri.c,v retrieving revision 1.3 diff -u -r1.3 func_uri.c --- funcs/func_uri.c 24 Oct 2005 20:12:06 -0000 1.3 +++ funcs/func_uri.c 8 Nov 2005 01:57:02 -0000 @@ -45,7 +45,7 @@ { char uri[BUFSIZ]; - if (!data || ast_strlen_zero(data)) { + if (ast_strlen_zero(data)) { ast_log(LOG_WARNING, "Syntax: URIENCODE() - missing argument!\n"); return NULL; } @@ -59,7 +59,7 @@ /*!\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() - missing argument!\n"); return NULL; } Index: pbx/pbx_ael.c =================================================================== RCS file: /usr/cvsroot/asterisk/pbx/pbx_ael.c,v retrieving revision 1.16 diff -u -r1.16 pbx_ael.c --- pbx/pbx_ael.c 26 Oct 2005 18:03:44 -0000 1.16 +++ pbx/pbx_ael.c 8 Nov 2005 01:57:03 -0000 @@ -496,7 +496,7 @@ 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; Index: pbx/pbx_dundi.c =================================================================== RCS file: /usr/cvsroot/asterisk/pbx/pbx_dundi.c,v retrieving revision 1.47 diff -u -r1.47 pbx_dundi.c --- pbx/pbx_dundi.c 6 Nov 2005 15:09:47 -0000 1.47 +++ pbx/pbx_dundi.c 8 Nov 2005 01:57:08 -0000 @@ -1568,7 +1568,7 @@ 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 @@ 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 @@ } } - 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 @@ 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 @@ } } - 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 @@ /* 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 @@ /* 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); Index: pbx/pbx_loopback.c =================================================================== RCS file: /usr/cvsroot/asterisk/pbx/pbx_loopback.c,v retrieving revision 1.10 diff -u -r1.10 pbx_loopback.c --- pbx/pbx_loopback.c 31 Oct 2005 15:34:11 -0000 1.10 +++ pbx/pbx_loopback.c 8 Nov 2005 01:57:08 -0000 @@ -122,9 +122,9 @@ 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); } Index: pbx/pbx_realtime.c =================================================================== RCS file: /usr/cvsroot/asterisk/pbx/pbx_realtime.c,v retrieving revision 1.13 diff -u -r1.13 pbx_realtime.c --- pbx/pbx_realtime.c 24 Oct 2005 20:12:06 -0000 1.13 +++ pbx/pbx_realtime.c 8 Nov 2005 01:57:09 -0000 @@ -97,9 +97,9 @@ 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 \ Index: res/res_agi.c =================================================================== RCS file: /usr/cvsroot/asterisk/res/res_agi.c,v retrieving revision 1.53 diff -u -r1.53 res_agi.c --- res/res_agi.c 3 Nov 2005 21:25:57 -0000 1.53 +++ res/res_agi.c 8 Nov 2005 01:57:11 -0000 @@ -2009,7 +2009,7 @@ 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; } Index: res/res_config_odbc.c =================================================================== RCS file: /usr/cvsroot/asterisk/res/res_config_odbc.c,v retrieving revision 1.31 diff -u -r1.31 res_config_odbc.c --- res/res_config_odbc.c 31 Oct 2005 21:31:25 -0000 1.31 +++ res/res_config_odbc.c 8 Nov 2005 01:57:13 -0000 @@ -168,7 +168,7 @@ 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 @@ 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); Index: res/res_features.c =================================================================== RCS file: /usr/cvsroot/asterisk/res/res_features.c,v retrieving revision 1.78 diff -u -r1.78 res_features.c --- res/res_features.c 6 Nov 2005 21:00:35 -0000 1.78 +++ res/res_features.c 8 Nov 2005 01:57:14 -0000 @@ -183,7 +183,7 @@ 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 @@ } - 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 @@ 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"); Index: res/res_monitor.c =================================================================== RCS file: /usr/cvsroot/asterisk/res/res_monitor.c,v retrieving revision 1.39 diff -u -r1.39 res_monitor.c --- res/res_monitor.c 24 Oct 2005 20:12:06 -0000 1.39 +++ res/res_monitor.c 8 Nov 2005 01:57:14 -0000 @@ -123,7 +123,7 @@ 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 @@ 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 @@ /* 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_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 @@ 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 @@ 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 @@ 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 @@ 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 @@ 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; } Index: res/res_musiconhold.c =================================================================== RCS file: /usr/cvsroot/asterisk/res/res_musiconhold.c,v retrieving revision 1.73 diff -u -r1.73 res_musiconhold.c --- res/res_musiconhold.c 24 Oct 2005 20:12:06 -0000 1.73 +++ res/res_musiconhold.c 8 Nov 2005 01:57:15 -0000 @@ -361,7 +361,7 @@ /* 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 @@ /* 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 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 @@ { 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);