3 ms·
Many protocols still relevant today make use of that structure, it still has widespread use.
by tjoff 4y ago
Many protocols still relevant today make use of that structure, it still has widespread use.
- masklinn 4y agoFor 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.