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 named function types for callbacks in net_crypto. #989

Merged
merged 1 commit into from
Jul 9, 2018

Conversation

iphydf
Copy link
Member

@iphydf iphydf commented Jul 8, 2018

Also:

  • compound statements (blocks, e.g. in if/else) must be non-empty.
    Comments don't count.
  • = is not allowed in subexpressions. We treat it as statement-only.
  • ++i is preferred over i++ in statements.
  • Type_Names are camelsnake-case.

This change is Reviewable

@iphydf iphydf added this to the v0.2.x milestone Jul 8, 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.

Reviewed 1 of 2 files at r1.
Reviewable status: 0 of 1 LGTMs obtained


toxcore/net_crypto.c, line 3006 at r1 (raw file):

        if (conn->status == CRYPTO_CONN_ESTABLISHED) {
            // TODO(irungentoo): add a timeout here?
            continue;

This piece of code looks very suspicious, add a comment that this is only to satisfy the coding style?

@iphydf iphydf force-pushed the nc-cb-types branch 2 times, most recently from d3d04a3 to 509daa7 Compare July 8, 2018 18:27
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: 0 of 1 LGTMs obtained


toxcore/net_crypto.c, line 3006 at r1 (raw file):

Previously, sudden6 wrote…

This piece of code looks very suspicious, add a comment that this is only to satisfy the coding style?

Is this clear enough?

@iphydf iphydf force-pushed the nc-cb-types branch 2 times, most recently from bb8395d to 3b96652 Compare July 8, 2018 19:34
Also:
* compound statements (blocks, e.g. in if/else) must be non-empty.
  Comments don't count.
* `=` is not allowed in subexpressions. We treat it as statement-only.
* `++i` is preferred over `i++` in statements.
* `Type_Names` are camelsnake-case.
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 1 of 1 files at r2.
Reviewable status: :shipit: complete! 1 of 1 LGTMs obtained


toxcore/net_crypto.c, line 3006 at r1 (raw file):

Previously, iphydf wrote…

Is this clear enough?

ok

@iphydf iphydf merged commit 751d094 into TokTok:master Jul 9, 2018
@iphydf iphydf deleted the nc-cb-types branch July 9, 2018 10:25
@iphydf iphydf modified the milestones: v0.2.x, v0.2.4 Jul 16, 2018
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

2 participants