3 ms·
For the average protocol you're going to init the entire message then set into it, you don't need to fully zero fields. This is mostly relevant to write into e
by masklinn 4y ago
For the average protocol you're going to init the entire message then set into it, you don't need to fully zero fields.
This is mostly relevant to write into existing memory or memory-mapped records.
- tjoff 4y agoSometimes yes, but you must also not null-terminate the strings in those cases. And on embedded devices you are often memory constrained so you might reuse an existing structure.