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 in place of 0/1 int values. #1132

Merged
merged 1 commit into from
Aug 26, 2018
Merged

Conversation

iphydf
Copy link
Member

@iphydf iphydf commented Aug 26, 2018

This change is Reviewable

@iphydf iphydf added this to the v0.2.x milestone Aug 26, 2018
Copy link

@sudden6 sudden6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm_strong:

Reviewed 2 of 4 files at r1.
Reviewable status: 0 of 1 approvals obtained (waiting on @iphydf)


toxcore/DHT.h, line 206 at r1 (raw file):

    uint8_t shared_key[CRYPTO_SHARED_KEY_SIZE];
    uint32_t times_requested;
    bool stored; /* 0 if not, 1 if is */

update comment to true and false or maybe remove entirely, IMO it's clear now


toxcore/network.c, line 955 at r1 (raw file):

 *  unset means unequal
 *
 * returns 0 when not equal or when uninitialized

update comment


toxcore/network.c, line 1003 at r1 (raw file):

 *  unset means unequal
 *
 * returns 0 when not equal or when uninitialized

update comment


toxcore/network.c, line 1144 at r1 (raw file):

 *  address: dotted notation (IPv4: quad, IPv6: 16) or colon notation (IPv6)
 *
 * returns 1 on success, 0 on failure

update comment


toxcore/network.c, line 1176 at r1 (raw file):

 *  IP: family and the value is set on success
 *
 * returns 1 on success, 0 on failure

update comment


toxcore/network.c, line 1322 at r1 (raw file):

 *  returns in *tro a matching address (IPv6 or IPv4)
 *  returns in *extra, if not NULL, an IPv4 address, if to->family was AF_UNSPEC
 *  returns 1 on success

update comment

Copy link

@sudden6 sudden6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm_cancel:

Reviewable status: :shipit: complete! 1 of 1 approvals obtained (waiting on @iphydf)

Copy link
Member Author

@iphydf iphydf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! 1 of 1 approvals obtained (waiting on @sudden6)


toxcore/DHT.h, line 206 at r1 (raw file):

Previously, sudden6 wrote…

update comment to true and false or maybe remove entirely, IMO it's clear now

Done.


toxcore/network.c, line 955 at r1 (raw file):

Previously, sudden6 wrote…

update comment

Done.


toxcore/network.c, line 1003 at r1 (raw file):

Previously, sudden6 wrote…

update comment

Done.


toxcore/network.c, line 1144 at r1 (raw file):

Previously, sudden6 wrote…

update comment

Done.


toxcore/network.c, line 1176 at r1 (raw file):

Previously, sudden6 wrote…

update comment

Done.


toxcore/network.c, line 1322 at r1 (raw file):

Previously, sudden6 wrote…

update comment

Done.

@codecov
Copy link

codecov bot commented Aug 26, 2018

Codecov Report

Merging #1132 into master will decrease coverage by <.1%.
The diff coverage is 76.4%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master   #1132     +/-   ##
========================================
- Coverage    82.5%   82.4%   -0.1%     
========================================
  Files          81      81             
  Lines       14437   14437             
========================================
- Hits        11912   11903      -9     
- Misses       2525    2534      +9
Impacted Files Coverage Δ
toxcore/DHT.c 76.6% <100%> (ø) ⬆️
toxcore/network.c 83.4% <73.3%> (ø) ⬆️
toxcore/group.c 71.7% <0%> (-1.5%) ⬇️
toxcore/LAN_discovery.c 83.9% <0%> (-1%) ⬇️
toxcore/net_crypto.c 93% <0%> (-0.6%) ⬇️
toxcore/onion_client.c 94.8% <0%> (-0.2%) ⬇️
toxcore/Messenger.c 85.8% <0%> (ø) ⬆️
toxav/toxav.c 68% <0%> (+0.8%) ⬆️
toxav/msi.c 65.3% <0%> (+1.6%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5352f48...9a70a2c. Read the comment docs.

@iphydf iphydf merged commit 9a70a2c into TokTok:master Aug 26, 2018
@iphydf iphydf deleted the more-bools branch August 26, 2018 22:21
@robinlinden robinlinden modified the milestones: v0.2.x, v0.2.7 Aug 30, 2018
This pull request was closed.
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.

3 participants