Module: kamailio
Branch: 5.5
Commit: 4b9987bd630d78aa27ea392491989ddfeeda0d98
URL:
https://github.com/kamailio/kamailio/commit/4b9987bd630d78aa27ea392491989dd…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2021-12-16T08:29:49+01:00
core: parser/sdp - coherent indentation of two functions
(cherry picked from commit 1b5756ae9f67c3907c134eb725f19c875cccd913)
---
Modified: src/core/parser/sdp/sdp_helpr_funcs.c
---
Diff:
https://github.com/kamailio/kamailio/commit/4b9987bd630d78aa27ea392491989dd…
Patch:
https://github.com/kamailio/kamailio/commit/4b9987bd630d78aa27ea392491989dd…
---
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;
}