Re: [PATCH 2/3] doc-rst:c-domain: function-like macros arguments

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 06.09.2016 um 14:27 schrieb Jonathan Corbet <corbet@xxxxxxx>:

> So I'm going into total nit-picking territory here, but since I'm looking
> at it and I think the series needs a respin anyway...
> 
> On Wed, 31 Aug 2016 17:29:31 +0200
> Markus Heiser <markus.heiser@xxxxxxxxxxx> wrote:
> 
>> +        m = c_funcptr_sig_re.match(sig)
>> +        if m is None:
>> +            m = c_sig_re.match(sig)
>> +        if m is None:
>> +            raise ValueError('no match')
> 
> How about we put that second test inside the first if block and avoid the
> redundant None test if the first match works?  The energy saved may
> prevent a hurricane someday :)

And prohibit the MS-Windows update installer will save the climate ;)
It is a habit of mine to avoid indentations, but you are right,
it is not appropriate here.

>> +
>> +        rettype, fullname, arglist, _const = m.groups()
>> +        if rettype or not arglist.strip():
>> +            return False
>> +
>> +        arglist = arglist.replace('`', '').replace('\\ ', '').strip()  # remove markup
>> +        arglist = [a.strip() for a in arglist.split(",")]
> 
> Similarly, stripping the args three times seems a bit much.  The middle
> one is totally redundant and could go at a minimum.

Thanks for pointing this. You are right, I will fix it.

-- Markus --

> 
> Thanks,
> 
> jon

--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux