3 ms·
> 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 like
by 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.