3 ms·
In this case the memory isn't uninitialised - it's been initialised by bio_init(), which sets bi_partno to 0.
by caf 9y ago
In this case the memory isn't uninitialised - it's been initialised by bio_init(), which sets bi_partno to 0.
- masklinn 9y ago> it's been initialised by bio_init(), which sets bi_partno to 0. It just memsets the entire thing to 0, which in Rust would 1. require unsafe{} 2. most likely be UB as the struct looks like it has a bunch of pointers which would not be nullable (e.g. arrays) And therefore not be done at all, or rejected by reviewers if attempted.