From owner-freebsd-current@FreeBSD.ORG Thu Jul 3 16:18:22 2008 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 48EDB106568A; Thu, 3 Jul 2008 16:18:22 +0000 (UTC) (envelope-from screwdriver@lxnt.info) Received: from mail.lxnt.info (mail.lxnt.info [77.95.131.23]) by mx1.freebsd.org (Postfix) with ESMTP id 02C708FC24; Thu, 3 Jul 2008 16:18:21 +0000 (UTC) (envelope-from screwdriver@lxnt.info) Received: from [195.34.193.156] (helo=[192.168.254.231]) by mail.lxnt.info with esmtpa (Exim 4.69 (FreeBSD)) (envelope-from ) id 1KEQrx-0006wu-PC; Thu, 03 Jul 2008 19:37:13 +0400 Message-ID: <486CF22F.3080901@lxnt.info> Date: Thu, 03 Jul 2008 19:37:19 +0400 From: Alexander Sabourenkov User-Agent: Thunderbird 2.0.0.14 (X11/20080505) MIME-Version: 1.0 To: gary.jennejohn@freenet.de References: <20080703140719.GA72315@onelab2.iet.unipi.it> <20080703170700.3b91b8c6@peedub.jennejohn.org> In-Reply-To: <20080703170700.3b91b8c6@peedub.jennejohn.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: usb@freebsd.org, Luigi Rizzo , current@freebsd.org Subject: Re: may I commit this small umodem patch ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jul 2008 16:18:22 -0000 Gary Jennejohn wrote: > On Thu, 3 Jul 2008 16:07:19 +0200 > Luigi Rizzo wrote: > [...] >>> +#if 1 >>> + if (ret == UMATCH_NONE && >>> + id->bInterfaceClass == UICLASS_CDC_DATA && >>> + id->bInterfaceSubClass == UISUBCLASS_DATA && >>> + id->bInterfaceProtocol == 0x00) >>> + ret = UMATCH_IFACECLASS_IFACESUBCLASS_IFACEPROTO; >>> + return ret; >>> +#endif >>> + >>> if (ret == UMATCH_NONE) >>> return (ret); > > Is there any reason to keep the #if 1 ... #endif? And why not just > directly return UMATCH_IFACECLASS_IFACESUBCLASS_IFACEPROTO rather than > assigning it to ret first? This patch also makes all statements below ''return ret;'' unreachable. I think it should be rewritten. -- ./lxnt