-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
bgpd: Fix format overflow for graceful-restart debug logs #15210
bgpd: Fix format overflow for graceful-restart debug logs #15210
Conversation
Use enum instead of int, and make the compiler happy when using -format-overflow. Signed-off-by: Donatas Abraitis <[email protected]>
@Mergifyio backport stable/9.1 stable/9.0 stable/8.5 |
✅ Backports have been created
|
/*This is incremental updates i.e no tear down | ||
*of the existing session | ||
*as the peer is already working in the same mode. | ||
if ((int)new_peer_state == (int)bgp_gr_global_mode) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
both are enum_peer_mode right? Why do we need casting to (int)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not really, they are different 🤷
bgpd: Fix format overflow for graceful-restart debug logs (backport #15210)
bgpd: Fix format overflow for graceful-restart debug logs (backport #15210)
bgpd: Fix format overflow for graceful-restart debug logs (backport #15210)
Use enum instead of int, and make the compiler happy when using -format-overflow.
Without this patch, it does not compile e.g. on Debian12.