summaryrefslogtreecommitdiff
path: root/channels/sip/reqresp_parser.c
diff options
context:
space:
mode:
authorWalter Doekes <walter+asterisk@wjd.nu>2011-11-11 21:37:53 +0000
committerWalter Doekes <walter+asterisk@wjd.nu>2011-11-11 21:37:53 +0000
commit863d7189b911009df848512478fe0c163ce0cd70 (patch)
treea6392babbf6bab9b982ceffcf143b4f0f7fba249 /channels/sip/reqresp_parser.c
parentbac9ff62efb02e8b0560a76bd2293100fe0a4341 (diff)
Remove unneeded if(params) checks in reqresp_parser.
Nick Lewis added them in https://reviewboard.asterisk.org/r/549/diff/1-2/ for no apparent reason. There is no way that params could become NULL in that piece of code, so I removed these excess checks again. ........ Merged revisions 344837 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 344839 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@344840 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/sip/reqresp_parser.c')
-rw-r--r--channels/sip/reqresp_parser.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/channels/sip/reqresp_parser.c b/channels/sip/reqresp_parser.c
index ecce4bd57..d135e0073 100644
--- a/channels/sip/reqresp_parser.c
+++ b/channels/sip/reqresp_parser.c
@@ -176,23 +176,23 @@ int parse_uri_full(char *uri, const char *scheme, char **user, char **pass,
}
if (!strcmp(label, "transport")) {
- if (params) {params->transport=value;}
+ params->transport = value;
rem = parameters;
} else if (!strcmp(label, "user")) {
- if (params) {params->user=value;}
+ params->user = value;
rem = parameters;
} else if (!strcmp(label, "method")) {
- if (params) {params->method=value;}
+ params->method = value;
rem = parameters;
} else if (!strcmp(label, "ttl")) {
- if (params) {params->ttl=value;}
+ params->ttl = value;
rem = parameters;
} else if (!strcmp(label, "maddr")) {
- if (params) {params->maddr=value;}
+ params->maddr = value;
rem = parameters;
/* Treat "lr", "lr=yes", "lr=on", "lr=1", "lr=almostanything" as lr enabled and "", "lr=no", "lr=off", "lr=0", "lr=" and "lranything" as lr disabled */
} else if ((!strcmp(label, "lr") && strcmp(value, "no") && strcmp(value, "off") && strcmp(value, "0") && strcmp(value, "")) || ((lr) && strcmp(value, "lr"))) {
- if (params) {params->lr=1;}
+ params->lr = 1;
rem = parameters;
} else {
value--;