From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39523) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X54BZ-0006KF-O6 for qemu-devel@nongnu.org; Wed, 09 Jul 2014 22:34:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X54BQ-0007En-Mf for qemu-devel@nongnu.org; Wed, 09 Jul 2014 22:34:13 -0400 Message-ID: <53BDFB6C.8010409@gmail.com> Date: Thu, 10 Jul 2014 10:33:16 +0800 From: Chen Gang MIME-Version: 1.0 References: <53B57D5B.2070204@gmail.com> <53BD4A94.2000300@msgid.tls.msk.ru> In-Reply-To: <53BD4A94.2000300@msgid.tls.msk.ru> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH trivial] qemu-img: Remove redundancy "ret = -1" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Tokarev Cc: Kevin Wolf , qemu-trivial@nongnu.org, qemu-devel@nongnu.org, stefanha@redhat.com 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