coturn/src/apps/common
Michael Jones 98d91a73cf
Improve const correctness in coturn (#1424)
Marking variables as const when they won't be modified after
initialization helps programmers trying to understand a codebase to
manage the cognative load.

This pull request uses a clang-tidy fixit (Hard to automate, since the
code needs to be temporarily compiled as C++ for it to work) to try to
mechanically apply the const keyword to code where the automated tool
can determine that the variable won't be modified.

I then follow this up with a manual improvement pass to
turnutils_uclient, where I address const correctness of local variables,
as well as do some adjustments to loops and scoping to help with
reducing complexity.

Co-authored-by: redraincatching <redraincatching@disroot.org>
Co-authored-by: Pavel Punsky <eakraly@users.noreply.github.com>
2025-09-08 21:14:56 -07:00
..
win Add the InsertBraces command for clang-format to ensure that all conditionals always have braces (#1408) 2024-01-27 16:38:40 -08:00
apputils.c Improve const correctness in coturn (#1424) 2025-09-08 21:14:56 -07:00
apputils.h Make older TLS versions optional (#1693) 2025-05-30 09:20:14 -07:00
CMakeLists.txt Add spdx tags to all source files (#1510) 2025-05-30 11:56:04 +02:00
ns_turn_openssl.h Add spdx tags to all source files (#1510) 2025-05-30 11:56:04 +02:00
ns_turn_utils.c Improve const correctness in coturn (#1424) 2025-09-08 21:14:56 -07:00
ns_turn_utils.h Add spdx tags to all source files (#1510) 2025-05-30 11:56:04 +02:00
stun_buffer.c Improve const correctness in coturn (#1424) 2025-09-08 21:14:56 -07:00
stun_buffer.h Use bool, instead of int, for the functions in ns_turn_msg.c (#1553) 2024-08-23 17:49:14 -07:00