- len is first adjusted by the amount of chars consumed so far
- start pointer is then adjusted to begin new search

#### Pre-Submission Checklist
- [X] Commit message has the format required by CONTRIBUTING guide
- [X] Commits are split per component (core, individual modules, libs, utils, 
...)
- [X] Each component has a single commit (if not, squash them into one commit)
- [X] No commits to README files for modules (changes must be done to docbook 
files
in `doc/` subfolder, the README file is autogenerated)

#### Type Of Change
- [X] Small bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)

#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the 
checkboxes that apply -->
- [X] PR should be backported to stable branches
- [X] Tested changes locally
- [X] Related to issue #4229

#### Description
Small logic tweak — we adjust `len` by the amount of chars consumed first, then 
adjust the `start` pointer to begin the new search.

Existing:
```
        start = space + 1;
        len = len - (space - start + 1); // this is a no-op
                                                            // as the pointer 
was adjusted first
```
You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/4230

-- Commit Summary --

  * core: sdp - update start pointer only after len adjustment

-- File Changes --

    M src/core/parser/sdp/sdp_helpr_funcs.c (2)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/4230.patch
https://github.com/kamailio/kamailio/pull/4230.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/4230
You are receiving this because you are subscribed to this thread.

Message ID: <kamailio/kamailio/pull/4...@github.com>
_______________________________________________
Kamailio - Development Mailing List -- sr-dev@lists.kamailio.org
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to