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

changed variables in ns_turn_session.h and to bool #1427

Closed

Conversation

redraincatching
Copy link
Contributor

changed variables that appeared in ns_turn_session.h and and their uses to bool to follow C11 idioms

approach was as follows:

  • if a variable of type int was only being used as a boolean, replace it with bool as defined in <stdbool.h>
  • replace its declaration and assignment with true/false, depending on prior assignment as 0/1
  • then check any error that appear after build and update them to reflect changes

changes were only made when i was certain the variables were not being used as an int, so i may have missed some

@eakraly
Copy link
Collaborator

eakraly commented Feb 11, 2024

Hi @redraincatching
I suggest you split PRs - make one change at a time (one variable or one method). It would be much easier to review.

In this PR, you make changes to function definitions but do not change calls to the functions
For example, you change stun_is_command_message_full_check_str to accept bool but did not change calls to it. So what you have is silent casting and this may introduce some very subtle errors.

@ggarber
Copy link
Contributor

ggarber commented Apr 19, 2024

@redraincatching Can you take a look at the comment?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants