3 ms·
It's not just unnecessary, it's wrong since it casts a potentially-unaligned pointer, instead of just using `memcpy`. It will happen to work in some common cas
by o11c 2y ago
It's not just unnecessary, it's wrong since it casts a potentially-unaligned pointer, instead of just using `memcpy`.
It will happen to work in some common cases if the input is exactly the output of `malloc`, or the same after certain kinds of fixed headers, but will fail for many other buffers.