Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 2 darr (dynamic-array) bugs #17648

Merged
merged 3 commits into from
Dec 20, 2024

Conversation

choppsv1
Copy link
Contributor

@choppsv1 choppsv1 commented Dec 14, 2024

  • fix issue with nested macros
  • use frr sprintf

@frrbot frrbot bot added the bugfix label Dec 16, 2024
@choppsv1 choppsv1 changed the title Fix darr sprintf Fix 2 darr bugs Dec 16, 2024
@github-actions github-actions bot added size/M and removed size/S labels Dec 16, 2024
@choppsv1 choppsv1 changed the title Fix 2 darr bugs Fix 2 darr (dynamic-array) bugs Dec 16, 2024
Signed-off-by: Christian Hopps <chopps@labn.net>
- ran into problem with darr macros and nested macros using the same name
variables as passed in variables in an out scope. Make these macro scoped
variables more unique as well.

Signed-off-by: Christian Hopps <chopps@labn.net>
- WHen declaring macro scoped variables, can run into problem if the macro
variable passed in has the same name as the new variable introduced in the inner
scope. We don't get a warning and the uses will be wrong.

e.g.,

```

{
    int __len = 10;
    foo(__len); // => 10 and not 15 as we wanted.
}
```

Signed-off-by: Christian Hopps <chopps@labn.net>
@mjstapp mjstapp merged commit abefc60 into FRRouting:master Dec 20, 2024
11 checks passed
@choppsv1 choppsv1 deleted the fix-darr-sprintf branch December 20, 2024 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants