aboutsummaryrefslogtreecommitdiffstats
path: root/funcs/func_callerid.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-12-25 02:31:04 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-12-25 02:31:04 +0000
commit131cea90acb24b221fcacd799e40892f234da1c5 (patch)
treeee27edb25d915e26c83bc240bd7a3120cd13b5e2 /funcs/func_callerid.c
parent0b1ac5dd0b9ef4191c21a0217aef38fc99727039 (diff)
Simplify the if statements used to check to see if the argument was "num"
or "number". It is not possible to ever reach the second part of this conditional statement. Thanks to my brother, Brett, for pointing this out. :) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48951 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'funcs/func_callerid.c')
-rw-r--r--funcs/func_callerid.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/funcs/func_callerid.c b/funcs/func_callerid.c
index 5af8e1ca1..6621d4d7c 100644
--- a/funcs/func_callerid.c
+++ b/funcs/func_callerid.c
@@ -54,9 +54,7 @@ static int callerid_read(struct ast_channel *chan, char *cmd, char *data,
snprintf(buf, len, "\"%s\" <%s>", name, num);
} else if (!strncasecmp("name", data, 4)) {
ast_copy_string(buf, name, len);
- } else if (!strncasecmp("num", data, 3) ||
- !strncasecmp("number", data, 6)) {
-
+ } else if (!strncasecmp("num", data, 3)) {
ast_copy_string(buf, num, len);
} else {
ast_log(LOG_ERROR, "Unknown callerid data type '%s'.\n", data);
@@ -70,8 +68,7 @@ static int callerid_read(struct ast_channel *chan, char *cmd, char *data,
if (chan->cid.cid_name) {
ast_copy_string(buf, chan->cid.cid_name, len);
}
- } else if (!strncasecmp("num", data, 3)
- || !strncasecmp("number", data, 6)) {
+ } else if (!strncasecmp("num", data, 3)) {
if (chan->cid.cid_num) {
ast_copy_string(buf, chan->cid.cid_num, len);
}
@@ -113,8 +110,7 @@ static int callerid_write(struct ast_channel *chan, char *cmd, char *data,
ast_set_callerid(chan, num, name, num);
} else if (!strncasecmp("name", data, 4)) {
ast_set_callerid(chan, NULL, value, NULL);
- } else if (!strncasecmp("num", data, 3) ||
- !strncasecmp("number", data, 6)) {
+ } else if (!strncasecmp("num", data, 3)) {
ast_set_callerid(chan, value, NULL, NULL);
} else if (!strncasecmp("ani", data, 3)) {
ast_set_callerid(chan, NULL, NULL, value);