Re: [mm] 4e2c82a409: ltp.overcommit_memory01.fail

From: Qian Cai
Date: Thu Jul 09 2020 - 23:26:09 EST




> On Jul 9, 2020, at 9:38 PM, Feng Tang <feng.tang@xxxxxxxxx> wrote:
>
> Give it a second thought, my previous way has more indents and lines,
> but it is easier to be understood that we have special handling for
> 'write' case. So I would prefer using it.
>
> Thoughts?

I donât feel it is easier to understand. I generally prefer to bail out early if possible to also make code a bit more solid for future extensions (once the indentation reached 3+ levels, we will need to rework it).

But, I realize that I have spent too much time debugging than actually writing code those days, so my taste is probably not all that good. Thus, feel free to submit what style you prefer, so other people have more experience coding could review them more.