may I commit this small umodem patch ?

Alexander Sabourenkov screwdriver at lxnt.info
Thu Jul 3 16:18:22 UTC 2008


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



More information about the freebsd-usb mailing list