summaryrefslogtreecommitdiff
path: root/funcs/func_callerid.c
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2006-12-25 02:31:04 +0000
committerRussell Bryant <russell@russellbryant.com>2006-12-25 02:31:04 +0000
commit527dbe399e230fa8f9384c38e509567dab77d2f7 (patch)
treeee27edb25d915e26c83bc240bd7a3120cd13b5e2 /funcs/func_callerid.c
parentd3bf06f272b81a178e06f79e22ae413628a5996d (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: https://origsvn.digium.com/svn/asterisk/trunk@48951 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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);