Skip to content

why use char** if buffers does not reallocated? #56

Description

@Voljka1

hello, i am very green in all areas, MCU, C, etc. So i sit together with Copilot and learn how this code works.
And one of problem what exists for me, is why you use char** for RW strings?
Copilot looks at library code and said, what strings are modified without reallocation, so char* is enough.
This will make more simple data structures, which describe OID sets.
And thank you for your library :)

addReadWriteStringHandler(const char *oid, char** value, size_t max_len, …)
That means it expects the address of a char*, not just a char*. Even though we’ve confirmed from the implementation that it never actually reassigns the pointer, you still have to comply with the signature.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions