Skip to content

[Perfs] : Remove unecessary nullpointer checks that clutter the codebase #8

Description

@bebenlebricolo

Almost every function in the SDK that might use pointers will check that those pointers are not NULL at the beginning of a function.
Albeit this makes sense in other areas of development (like on desktops, and even then an assert will do the job just fine), as this is embedded development we are quite sure to know at compile-time if a pointer can actually be NULL or not.

If this is just to protect one API about junk being passed in as an argument, then crash.
The tests are built for that actually (...).

Either we can use compile-time asserts, or wrap those in handy macros that can be expanded to various code blocks depending on the configuration (release, debug, release with deb info, bare-metal deployment or x86_64 arch testing harness, etc...)

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions