Skip to content

fixed XMALLOC, XFREE and XREALLOC definitions for embOS#7274

Merged
douzzer merged 2 commits intowolfSSL:masterfrom
SKlimaRA:SKlimaRA/fix-embos-heap-allocation-macros
Feb 27, 2024
Merged

fixed XMALLOC, XFREE and XREALLOC definitions for embOS#7274
douzzer merged 2 commits intowolfSSL:masterfrom
SKlimaRA:SKlimaRA/fix-embos-heap-allocation-macros

Conversation

@SKlimaRA
Copy link
Copy Markdown
Contributor

@SKlimaRA SKlimaRA commented Feb 27, 2024

Description

Mismatched parentheses and fix for embOS API v5.

Fixes zd#17586

Testing

How did you test?

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

@wolfSSL-Bot
Copy link
Copy Markdown

Can one of the admins verify this patch?

Comment thread wolfssl/wolfcrypt/settings.h Outdated
#define XFREE(p, h, type) ((void)(h), (void)(type), OS_HEAP_free((p)))
#define XREALLOC(p, n, h, t) ((void)(h), (void)(t), OS_HEAP_realloc(((p), (n)))
/* Per the user manual of embOS https://www.segger.com/downloads/embos/UM01001
this API has changed with V5. */
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Our style is to prefix this line with * so that "this" will align with "Per" on the line above.

Comment thread wolfssl/wolfcrypt/types.h Outdated
#endif
#define XREALLOC(p, n, h, t) wolfSSL_Realloc((p), (n), (h), (t))
#endif /* WOLFSSL_DEBUG_MEMORY */
#elif defined(WOLFSSL_EMBOS) && !defined(XMALLOC_USER) && !defined(NO_WOLFSSL_MEMORY) && !defined(WOLFSSL_STATIC_MEMORY)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Our style is to have 80 characters per line. even though this isn't followed in the code surrounding this change (ie XFREE above), but that is for readability. Please use \ to keep lines below 80 characters.

@anhu
Copy link
Copy Markdown
Member

anhu commented Feb 27, 2024

Contributor agreement is on file. Assigning to @douzzer for further review.

@anhu anhu requested a review from douzzer February 27, 2024 14:30
@anhu anhu requested a review from wolfSSL-Bot February 27, 2024 14:31
@douzzer
Copy link
Copy Markdown
Contributor

douzzer commented Feb 27, 2024

ok to test

@douzzer
Copy link
Copy Markdown
Contributor

douzzer commented Feb 27, 2024

retest this please

@douzzer douzzer merged commit e64a26d into wolfSSL:master Feb 27, 2024
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.

4 participants