⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

@ThePassionate
Copy link
Contributor

Crypto Soft: Replace howmany with div_round_up

Summary

This PR replaces the non-standard howmany macro with the common div_round_up macro in the cryptosoft implementation. This improves code consistency across the NuttX codebase and enhances maintainability.

Changes

Files Modified

  1. crypto/cryptosoft.c
    • Replace howmany macro calls with standard div_round_up macro
    • Improves code consistency with NuttX standards

Technical Details

Macro Replacement:

  • The howmany macro is a non-standard implementation for division with rounding up
  • div_round_up is the common NuttX standard macro for the same operation
  • This change maintains identical functionality while improving consistency

Benefits:

  • Aligns with NuttX coding standards
  • Reduces use of non-standard macros
  • Improves code readability and maintainability
  • Facilitates future refactoring and maintenance

Impact

  • Consistency: Improves code consistency across the crypto subsystem
  • Maintainability: Easier to maintain and understand
  • Standards: Follows NuttX standard patterns
  • Compatibility: No functional impact; maintains existing behavior

Testing

No functional changes, existing tests continue to pass.


Author: makejian [email protected]

Replace the non-standard howmany macro with the common div_round_up macro
for consistency and better code maintainability.

Signed-off-by: makejian <[email protected]>
@github-actions github-actions bot added Area: Crypto Size: XS The size of the change in this PR is very small labels Jan 19, 2026
@GUIDINGLI GUIDINGLI merged commit 043ef0d into apache:master Jan 19, 2026
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Crypto Size: XS The size of the change in this PR is very small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants