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

Fix style in DHT.c. #994

Merged
merged 1 commit into from
Jul 12, 2018
Merged

Fix style in DHT.c. #994

merged 1 commit into from
Jul 12, 2018

Commits on Jul 12, 2018

  1. Fix style in DHT.c.

    * Removed `ARRAY_SIZE` and use NULL markers for end of array, instead.
      The alternative is + size, but for these arrays, NULL markers made
      sense, since they are arrays of non-null pointers.
    * Made `INDEX_OF_PK` a self-contained macro, not dependent upon the
      naming inside its call site. This is a minor change but makes the code
      more local and reviews easier.
    * No nested structs.
    * Use only named function types ending in `_cb` for callbacks.
    * Replaced two macros with functions.
    * `++i` instead of `i++`.
    * struct member names start with lowercase letters.
    * It takes a bit of work to support `/**/` comments in preprocessor
      macros, so I've decided not to support these. If a macro is complex
      enough to need comments inside it, it's too complex. `//` comments are
      allowed at the end of macro definitions.
    * Callback typedefs must name their parameters.
    iphydf committed Jul 12, 2018
    Configuration menu
    Copy the full SHA
    cbda010 View commit details
    Browse the repository at this point in the history