Received: from eggs.gnu.org ([2001:4830:134:3::10]:52197) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQtrr-0004E2-15 for qemu-devel@nongnu.org; Thu, 26 Feb 2015 03:32:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YQtrm-0003fl-33 for qemu-devel@nongnu.org; Thu, 26 Feb 2015 03:32:22 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44200) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQtrl-0003fh-S3 for qemu-devel@nongnu.org; Thu, 26 Feb 2015 03:32:18 -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> <87bnkigwq2.fsf@blackfin.pond.sub.org> <20150226035446.GD5811@ubuntu-trusty> Date: Thu, 26 Feb 2015 08:50:41 +0100 In-Reply-To: <20150226035446.GD5811@ubuntu-trusty> (Liu Yuan's message of "Thu, 26 Feb 2015 11:54:46 +0800") Message-ID: <87fv9t8626.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 25, 2015 at 10:35:17AM +0100, Markus Armbruster wrote: >> 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. > > Hi Markus, I've checked the whole file as possible as I can. I can't find more > ret mixing bugs. Thanks!