Re: may I commit this small umodem patch ?

From: Alexander Sabourenkov <screwdriver_at_lxnt.info>
Date: Thu, 03 Jul 2008 19:37:19 +0400
Gary Jennejohn wrote:
> On Thu, 3 Jul 2008 16:07:19 +0200
> Luigi Rizzo <rizzo_at_icir.org> 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
Received on Thu Jul 03 2008 - 14:18:22 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:32 UTC