Skip to content

Conversation

@MarcFinetRtone
Copy link

To:

  • deref an uint8_t (otherwise the value could be an uint32_t)
  • fix deref size, since with pass the sizeof. For a pointer
    to a single struct with overflow the struct.

Typical usage:

struct {
        uint32_t x;
        uint32_t y;
        uint8_t data[10];
} foo;
LOG_BUFFER(LVL_DEBUG, &foo, sizeof(foo));

To:
- deref an uint8_t (otherwise the value could be an uint32_t)
- fix deref size, since with pass the sizeof. For a pointer
  to a single struct with overflow the struct.

Typical usage:
```c
struct {
        uint32_t x;
        uint32_t y;
        uint8_t data[10];
} foo;
LOG_BUFFER(LVL_DEBUG, &foo, sizeof(foo));
```
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.

1 participant