[svn-commits] wdoekes: branch 10 r344839 - in /branches/10: ./ channels/sip/reqresp_parser.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Fri Nov 11 15:36:07 CST 2011
Author: wdoekes
Date: Fri Nov 11 15:36:01 2011
New Revision: 344839
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=344839
Log:
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
Modified:
branches/10/ (props changed)
branches/10/channels/sip/reqresp_parser.c
Propchange: branches/10/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.
Modified: branches/10/channels/sip/reqresp_parser.c
URL: http://svnview.digium.com/svn/asterisk/branches/10/channels/sip/reqresp_parser.c?view=diff&rev=344839&r1=344838&r2=344839
==============================================================================
--- branches/10/channels/sip/reqresp_parser.c (original)
+++ branches/10/channels/sip/reqresp_parser.c Fri Nov 11 15:36:01 2011
@@ -176,23 +176,23 @@
}
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--;
More information about the svn-commits
mailing list