On Thu Feb 20 09:41:43 2025 +0000, Alexandre Julliard wrote:
Please don't change things that don't need changing. Some people like doing an early return, others prefer not to, it's a matter of taste. And in matters of taste, the rule is to not change other people's code. That sort of thing may sometimes be justified if there are too many indentation levels, but that's not the case here.
I agree with Damien here.
Ay? Style, no! It is called cyclomatic complexity and the graph has multiplicative combinatorial complexity for cascading if-stmts whereas the complexity is additive for successive ones handling base conditions.
That sort of thing may sometimes be justified if there are too many indentation levels, but that's not the case here.
Well only because things like heap allocations are not even being validated nor method parameter state space. The work very clearly fits into a larger volume of work to have a functional oleaut32 implementation.
It would all be very well arguing from a position of strength however this code, even a cursory inspection, is littered with enumerable bugs. Everything from integer overflows, buffer overflows, use-after-frees and using garbage values in weird char buffers both in the heap and in the stack. To be blunt it is comical and I suspect it only "works" in the sense that most of the Windows API surface really doesn't actually amount to anything operationally speaking so you have the illusion of working code.
"Don't make changes to other peoples code" is a extremely odd theology for a free software project. Considering these are the least controversial changes I plucked from a long series working towards logically sound code I really don't know what I can possibly say beyond the feeling that no one is welcome here to contribute.