Received: from eggs.gnu.org ([2001:4830:134:3::10]:47271) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQYNN-0001N2-Nj for qemu-devel@nongnu.org; Wed, 25 Feb 2015 04:35:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YQYNJ-0007Uq-ON for qemu-devel@nongnu.org; Wed, 25 Feb 2015 04:35:29 -0500 Received: from mx1.redhat.com ([209.132.183.28]:42942) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQYNJ-0007Um-HP for qemu-devel@nongnu.org; Wed, 25 Feb 2015 04:35:25 -0500 From: Markus Armbruster References: <87pp9f1b61.fsf@blackfin.pond.sub.org> <1423799142-21893-1-git-send-email-namei.unix@gmail.com> <87egpn7h38.fsf@blackfin.pond.sub.org> <20150225013953.GB6415@ubuntu-trusty> Date: Wed, 25 Feb 2015 10:35:17 +0100 In-Reply-To: <20150225013953.GB6415@ubuntu-trusty> (Liu Yuan's message of "Wed, 25 Feb 2015 09:39:53 +0800") Message-ID: <87bnkigwq2.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH] sheepdog: fix confused return values List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Liu Yuan Cc: sheepdog@lists.wpkg.org, qemu-devel@nongnu.org Liu Yuan writes: > On Wed, Feb 18, 2015 at 09:35:07AM +0100, Markus Armbruster wrote: >> Liu Yuan writes: >> >> > From: Liu Yuan >> > >> > These functions mix up -1 and -errno in return values and would might cause >> > trouble error handling in the call chain. >> > >> > This patch let them return -errno and add some comments. >> > >> > Reported-by: Markus Armbruster >> > Signed-off-by: Liu Yuan >> >> Did you review all functions returning negative errno, or just the two >> that caught my eye? > > Umm, mostly the two you mentioned. I encourage you to review the whole file for this error pattern! In my experience, bugs occur in clusters. When you find one, there's a high chance similar ones exist, and looking for them is good practice.