Module: kamailio
Branch: master
Commit: 1b5756ae9f67c3907c134eb725f19c875cccd913
URL:
https://github.com/kamailio/kamailio/commit/1b5756ae9f67c3907c134eb725f19c8…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-12-12T13:13:32+01:00
core: parser/sdp - coherent indentation of two functions
---
Modified: src/core/parser/sdp/sdp_helpr_funcs.c
---
Diff:
https://github.com/kamailio/kamailio/commit/1b5756ae9f67c3907c134eb725f19c8…
Patch:
https://github.com/kamailio/kamailio/commit/1b5756ae9f67c3907c134eb725f19c8…
---
diff --git a/src/core/parser/sdp/sdp_helpr_funcs.c
b/src/core/parser/sdp/sdp_helpr_funcs.c
index e118b4ac33..144d63b537 100644
--- a/src/core/parser/sdp/sdp_helpr_funcs.c
+++ b/src/core/parser/sdp/sdp_helpr_funcs.c
@@ -742,7 +742,7 @@ char* get_sdp_hdr_field(char* buf, char* end, struct hdr_field* hdr)
}
/* eliminate leading whitespace */
- tmp=eat_lws_end(tmp, end);
+ tmp=eat_lws_end(tmp, end);
if (tmp>=end) {
LM_ERR("hf empty\n");
goto error;
@@ -781,32 +781,32 @@ char* get_sdp_hdr_field(char* buf, char* end, struct hdr_field*
hdr)
char *find_sdp_line_delimiter(char* p, char* plimit, str delimiter)
{
- static char delimiterhead[3] = "--";
- char *cp, *cp1;
- /* Iterate through body */
- cp = p;
- for (;;) {
- if (cp >= plimit)
- return NULL;
- for(;;) {
- cp1 = ser_memmem(cp, delimiterhead, plimit-cp, 2);
- if (cp1 == NULL)
- return NULL;
- /* We matched '--',
- * now let's match the boundary delimiter */
- if (strncmp(cp1+2, delimiter.s, delimiter.len) == 0)
- break;
- else
- cp = cp1 + 2 + delimiter.len;
- if (cp >= plimit)
- return NULL;
- }
- if (cp1[-1] == '\n' || cp1[-1] == '\r')
- return cp1;
- if (plimit - cp1 < 2 + delimiter.len)
- return NULL;
- cp = cp1 + 2 + delimiter.len;
- }
+ static char delimiterhead[3] = "--";
+ char *cp, *cp1;
+ /* Iterate through body */
+ cp = p;
+ for (;;) {
+ if (cp >= plimit)
+ return NULL;
+ for(;;) {
+ cp1 = ser_memmem(cp, delimiterhead, plimit-cp, 2);
+ if (cp1 == NULL)
+ return NULL;
+ /* We matched '--',
+ * now let's match the boundary delimiter */
+ if (strncmp(cp1+2, delimiter.s, delimiter.len) == 0)
+ break;
+ else
+ cp = cp1 + 2 + delimiter.len;
+ if (cp >= plimit)
+ return NULL;
+ }
+ if (cp1[-1] == '\n' || cp1[-1] == '\r')
+ return cp1;
+ if (plimit - cp1 < 2 + delimiter.len)
+ return NULL;
+ cp = cp1 + 2 + delimiter.len;
+ }
}
@@ -815,10 +815,10 @@ char *find_sdp_line_delimiter(char* p, char* plimit, str delimiter)
*/
char *find_next_sdp_line_delimiter(char* p, char* plimit, str delimiter, char* defptr)
{
- char *t;
- if (p >= plimit || plimit - p < 3)
- return defptr;
- t = find_sdp_line_delimiter(p + 2, plimit, delimiter);
- return t ? t : defptr;
+ char *t;
+ if (p >= plimit || plimit - p < 3)
+ return defptr;
+ t = find_sdp_line_delimiter(p + 2, plimit, delimiter);
+ return t ? t : defptr;
}