2 ms·
There were examples in the linked message board post [1]. Note how there is now a paragraph describing why the code is written with 4 casts instead of comparing
by AlexandrB 11y ago
There were examples in the linked message board post [1]. Note how there is now a paragraph describing why the code is written with 4 casts instead of comparing pointers naively. Multiply this by hundreds of instances of similar code in a large code base.
[1] http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=tools/libxl/libxl_event.c;h=02b39e6da8c65c033c99a22db4784de8d7aeeb7a;hb=HEAD#l458 http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=tools/libx...
- Kristine1975 11y agoWhy not just write a function is_ptr_less that does all the casts. P.S: In C++ std::less is guaranteed to do the right thing(tm).