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

Use bool over int for the turnutils_uclient program #1420

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

jonesmz
Copy link
Contributor

@jonesmz jonesmz commented Jan 30, 2024

Converts all of the variables in the uclient program that should be bool but weren't.

A few other minor adjustments made at the behest of clang-tidy, but this change does not address all of clang-tidy's complaints.

@@ -348,23 +350,23 @@
}
}

static int clnet_allocate(int verbose, app_ur_conn_info *clnet_info, ioa_addr *relay_addr, int af, char *turn_addr,
static int clnet_allocate(bool verbose, app_ur_conn_info *clnet_info, ioa_addr *relay_addr, int af, char *turn_addr,

Check warning

Code scanning / PREfast

Function uses '133496' bytes of stack. Consider moving some data to heap. Warning

Function uses '133496' bytes of stack. Consider moving some data to heap.
@@ -746,7 +753,7 @@
return 0;
}

static int turn_channel_bind(int verbose, uint16_t *chn, app_ur_conn_info *clnet_info, ioa_addr *peer_addr) {
static int turn_channel_bind(bool verbose, uint16_t *chn, app_ur_conn_info *clnet_info, ioa_addr *peer_addr) {

Check warning

Code scanning / PREfast

Function uses '131236' bytes of stack. Consider moving some data to heap. Warning

Function uses '131236' bytes of stack. Consider moving some data to heap.
@@ -837,7 +844,7 @@
return 0;
}

static int turn_create_permission(int verbose, app_ur_conn_info *clnet_info, ioa_addr *peer_addr, int addrnum) {
static int turn_create_permission(bool verbose, app_ur_conn_info *clnet_info, ioa_addr *peer_addr, int addrnum) {

Check warning

Code scanning / PREfast

Function uses '131368' bytes of stack. Consider moving some data to heap. Warning

Function uses '131368' bytes of stack. Consider moving some data to heap.
@@ -1434,10 +1432,10 @@

//////////// RFC 6062 ///////////////

int turn_tcp_connect(int verbose, app_ur_conn_info *clnet_info, ioa_addr *peer_addr) {
int turn_tcp_connect(bool verbose, app_ur_conn_info *clnet_info, ioa_addr *peer_addr) {

Check warning

Code scanning / PREfast

Function uses '65556' bytes of stack. Consider moving some data to heap. Warning

Function uses '65556' bytes of stack. Consider moving some data to heap.
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

1 participant