Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261428AbUKBVjG (ORCPT ); Tue, 2 Nov 2004 16:39:06 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261838AbUKBVdM (ORCPT ); Tue, 2 Nov 2004 16:33:12 -0500 Received: from linux01.gwdg.de ([134.76.13.21]:11730 "EHLO linux01.gwdg.de") by vger.kernel.org with ESMTP id S261834AbUKBVco (ORCPT ); Tue, 2 Nov 2004 16:32:44 -0500 Date: Tue, 2 Nov 2004 22:29:40 +0100 (MET) From: Jan Engelhardt To: Jesper Juhl cc: Chris Friesen , Linux kernel Subject: Re: question on common error-handling idiom In-Reply-To: Message-ID: References: <4187E920.1070302@nortelnetworks.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 638 Lines: 28 >There are some places that do > >err = -SOMEERROR; >if (some_error) > goto out; >if (some_other_error) > goto out; >if (another_error) > goto out; > >Let's see what other people think :) err = -ESOME; if(some_error || some_other_error || another_error) { goto out; } Best. Jan Engelhardt -- Gesellschaft für Wissenschaftliche Datenverarbeitung Am Fassberg, 37077 Göttingen, www.gwdg.de - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/