aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authormogorman <mogorman@f38db490-d61c-443f-a65b-d21fe96a405b>2006-03-27 19:31:54 +0000
committermogorman <mogorman@f38db490-d61c-443f-a65b-d21fe96a405b>2006-03-27 19:31:54 +0000
commit7f2b0a39ea4bb48a13955fb3737b821ff4b0a1a5 (patch)
tree2db53aac89642dfbf8abe1d2a765fd76bc17106f /apps
parent33cdd88430f3166291238739ecbb0759f417d48d (diff)
Janitor work converting !ast_strlen_zero(a)?a:b
to S_OR functions. from bug note 6805 with minor modifications. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@15283 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_dial.c4
-rw-r--r--apps/app_directory.c2
-rw-r--r--apps/app_dumpchan.c2
-rw-r--r--apps/app_meetme.c4
4 files changed, 6 insertions, 6 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c
index 22f3e213b..2f9a4b0a3 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -541,7 +541,7 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct dial_l
senddialevent(in, o->chan);
/* After calling, set callerid to extension */
if (!ast_test_flag(peerflags, OPT_ORIGINAL_CLID))
- ast_set_callerid(o->chan, ast_strlen_zero(in->macroexten) ? in->exten : in->macroexten, get_cid_name(cidname, sizeof(cidname), in), NULL);
+ ast_set_callerid(o->chan, S_OR(in->macroexten, in->exten), get_cid_name(cidname, sizeof(cidname), in), NULL);
}
}
/* Hangup the original channel now, in case we needed it */
@@ -1135,7 +1135,7 @@ static int dial_exec_full(struct ast_channel *chan, void *data, struct ast_flags
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Called %s\n", numsubst);
if (!ast_test_flag(peerflags, OPT_ORIGINAL_CLID))
- ast_set_callerid(tmp->chan, ast_strlen_zero(chan->macroexten) ? chan->exten : chan->macroexten, get_cid_name(cidname, sizeof(cidname), chan), NULL);
+ ast_set_callerid(tmp->chan, S_OR(chan->macroexten, chan->exten), get_cid_name(cidname, sizeof(cidname), chan), NULL);
}
/* Put them in the list of outgoing thingies... We're ready now.
XXX If we're forcibly removed, these outgoing calls won't get
diff --git a/apps/app_directory.c b/apps/app_directory.c
index 1935a0ca8..63dd3c6c6 100644
--- a/apps/app_directory.c
+++ b/apps/app_directory.c
@@ -179,7 +179,7 @@ static int play_mailbox_owner(struct ast_channel *chan, char *context, char *dia
}
ast_stopstream(chan);
} else {
- res = ast_say_character_str(chan, !ast_strlen_zero(name) ? name : ext,
+ res = ast_say_character_str(chan, S_OR(name, ext),
AST_DIGIT_ANY, chan->language);
}
diff --git a/apps/app_dumpchan.c b/apps/app_dumpchan.c
index 115f149c4..5125354fb 100644
--- a/apps/app_dumpchan.c
+++ b/apps/app_dumpchan.c
@@ -126,7 +126,7 @@ static int ast_serialize_showchan(struct ast_channel *c, char *buf, size_t size)
ast_print_group(cgrp, sizeof(cgrp), c->callgroup),
ast_print_group(pgrp, sizeof(pgrp), c->pickupgroup),
( c->appl ? c->appl : "(N/A)" ),
- ( c-> data ? (!ast_strlen_zero(c->data) ? c->data : "(Empty)") : "(None)"),
+ ( c-> data ? S_OR(c->data, "(Empty)") : "(None)"),
(ast_test_flag(c, AST_FLAG_BLOCKING) ? c->blockproc : "(Not Blocking)"));
return 0;
diff --git a/apps/app_meetme.c b/apps/app_meetme.c
index 200144fdf..22ee8df7b 100644
--- a/apps/app_meetme.c
+++ b/apps/app_meetme.c
@@ -1845,8 +1845,8 @@ static struct ast_conference *find_conf(struct ast_channel *chan, char *confno,
if (!strcasecmp(args.confno, confno)) {
/* Bingo it's a valid conference */
cnf = build_conf(args.confno,
- ast_strlen_zero(args.pin) ? "" : args.pin,
- ast_strlen_zero(args.pinadmin) ? "" : args.pinadmin,
+ S_OR(args.pin, ""),
+ S_OR(args.pinadmin, ""),
make, dynamic, refcount);
break;
}