Module: kamailio
Branch: master
Commit: b03ec73589c12e566b11ce2c653401daa915c805
URL:
https://github.com/kamailio/kamailio/commit/b03ec73589c12e566b11ce2c653401d…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-04-05T07:54:12+02:00
core: parser/sdp - rename parameter to suggest better its role
---
Modified: src/core/parser/sdp/sdp_helpr_funcs.c
---
Diff:
https://github.com/kamailio/kamailio/commit/b03ec73589c12e566b11ce2c653401d…
Patch:
https://github.com/kamailio/kamailio/commit/b03ec73589c12e566b11ce2c653401d…
---
diff --git a/src/core/parser/sdp/sdp_helpr_funcs.c
b/src/core/parser/sdp/sdp_helpr_funcs.c
index b15ddeaa4bd..d5cb359b40f 100644
--- a/src/core/parser/sdp/sdp_helpr_funcs.c
+++ b/src/core/parser/sdp/sdp_helpr_funcs.c
@@ -735,14 +735,13 @@ int extract_sess_version(str *oline, str *sess_version)
* Auxiliary for some functions.
* Returns pointer to first character of found line, or NULL if no such line.
*/
-
-char *find_sdp_line(char *p, char *plimit, char linechar)
+char *find_sdp_line(char *pstart, char *plimit, char linechar)
{
static char linehead[3] = "x=";
char *cp, *cp1;
linehead[0] = linechar;
/* Iterate through body */
- cp = p;
+ cp = pstart;
for(;;) {
if(cp >= plimit)
return NULL;
@@ -767,13 +766,14 @@ char *find_sdp_line(char *p, char *plimit, char linechar)
}
-/* This function assumes p points to a line of requested type. */
-char *find_next_sdp_line(char *p, char *plimit, char linechar, char *defptr)
+/* This function assumes pstart points to a line of requested type. */
+char *find_next_sdp_line(
+ char *pstart, char *plimit, char linechar, char *defptr)
{
char *t;
- if(p >= plimit || plimit - p < 3)
+ if(pstart >= plimit || plimit - pstart < 3)
return defptr;
- t = find_sdp_line(p + 2, plimit, linechar);
+ t = find_sdp_line(pstart + 2, plimit, linechar);
return t ? t : defptr;
}