[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [Qemu-trivial] [PATCH trivial] qemu-img: Remove redunda
From: |
Chen Gang |
Subject: |
Re: [Qemu-devel] [Qemu-trivial] [PATCH trivial] qemu-img: Remove redundancy "ret = -1" |
Date: |
Thu, 10 Jul 2014 10:33:16 +0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 |
On 07/09/2014 09:58 PM, Michael Tokarev wrote:
> 03.07.2014 17:57, Chen Gang wrote:
>> In this case, 'ret' is already '-1', so need not do it again.
>
> It's a very minor thing in an error path, maybe compiler even
> eliminates this statement entirely by its own already.
>
Yeah, normal compiler with -O2, should eliminate it (maybe -O1 also OK).
> Not sure it is worth the effort but applied to the -trivial tree
> anyway, thanks!
For me, '-trivial' means none-urgent, but not mean minor (in fact some
of urgent things are minor), Coding-styles and trying to keep source
code simple are none-urgent, but not minor.
Normal things:
- None-urgent and none-important things, we need not do -- it is just
wasting members' time resources.
- Urgent and none-important things, need process it in time.
- None-urgent and important things, need process it when have time.
Special things:
- For urgent and important things which can be separated:
- need process for its' urgent part in time.
- and then process for its important part when have time.
- For urgent and important things which can not be separated:
- air, water and life are in this case.
- open, share, and attitude like air, water, and life.
- God have already blessed, but we need let them better and better.
Welcome any suggestions, discussions and completions.
Thanks.
--
Chen Gang
Open, share, and attitude like air, water, and life which God blessed