[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH for-3.1 v10 00/31] block: Fix some filename gene
From: |
Max Reitz |
Subject: |
Re: [Qemu-devel] [PATCH for-3.1 v10 00/31] block: Fix some filename generation issues |
Date: |
Fri, 17 Aug 2018 22:03:01 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
On 2018-08-16 08:02, Markus Armbruster wrote:
> Max Reitz <address@hidden> writes:
>
>> On 2018-08-15 05:43, address@hidden wrote:
>>> Hi,
>>>
>>> This series seems to have some coding style problems. See output below for
>>> more information:
>>
>> [...]
>>
>>> === OUTPUT BEGIN ===
>>> Checking PATCH 1/31: block: Use bdrv_refresh_filename() to pull...
>>> Checking PATCH 2/31: block: Use children list in bdrv_refresh_filename...
>>> Checking PATCH 3/31: block: Skip implicit nodes for filename info...
>>> Checking PATCH 4/31: block: Add BDS.auto_backing_file...
>>> Checking PATCH 5/31: block: Respect backing bs in bdrv_refresh_filename...
>>> ERROR: return is not a function, parentheses are not required
>>> #46: FILE: block.c:5192:
>>> + return (bs->auto_backing_file[0] != '\0');
>>>
>>> total: 1 errors, 0 warnings, 136 lines checked
>>
>> Sure, but I'd hate you personally if you omitted them.
>
> @@
> expression E;
> @@
> - return (E);
> + return E;
>
> You're welcome!
Well, I really don't like not putting parenthesis when returning
something that is not an identifier or a function call.
In fact, before I drop the parentheses, I'd drop the "!= '\0'", because
that is optional, too. (And then I could drop the parentheses anyway.)
Or write it with an explicit if-else (return true - return false).
Max
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH for-3.1 v10 24/31] block: Purify .bdrv_refresh_filename(), (continued)
- [Qemu-devel] [PATCH for-3.1 v10 24/31] block: Purify .bdrv_refresh_filename(), Max Reitz, 2018/08/09
- [Qemu-devel] [PATCH for-3.1 v10 26/31] block/nvme: Fix bdrv_refresh_filename(), Max Reitz, 2018/08/09
- [Qemu-devel] [PATCH for-3.1 v10 29/31] block/null: Generate filename even with latency-ns, Max Reitz, 2018/08/09
- [Qemu-devel] [PATCH for-3.1 v10 27/31] block/curl: Harmonize option defaults, Max Reitz, 2018/08/09
- [Qemu-devel] [PATCH for-3.1 v10 30/31] block: BDS options may lack the "driver" option, Max Reitz, 2018/08/09
- [Qemu-devel] [PATCH for-3.1 v10 28/31] block/curl: Implement bdrv_refresh_filename(), Max Reitz, 2018/08/09
- [Qemu-devel] [PATCH for-3.1 v10 31/31] iotests: Test json:{} filenames of internal BDSs, Max Reitz, 2018/08/09
- Re: [Qemu-devel] [PATCH for-3.1 v10 00/31] block: Fix some filename generation issues, no-reply, 2018/08/16