[libvirt] [PATCH] audit: Fix some comments

Ján Tomko jtomko at redhat.com
Fri Aug 8 06:07:57 UTC 2014


On 08/08/2014 04:29 AM, Wang Rui wrote:
> On 2014/8/7 17:07, Ján Tomko wrote:
>> On 08/07/2014 10:12 AM, Wang Rui wrote:
>>> Fix a comment in virDomainAuditNetDevice.
>>> Fix a typo in comment of qemuPhysIfaceConnect which is
>>> the caller of virDomainAuditNetDevice.
>>>
>>> Signed-off-by: Wang Rui <moon.wangrui at huawei.com>
>>> ---
>>>  src/conf/domain_audit.c | 4 ++--
>>>  src/qemu/qemu_command.c | 2 +-
>>>  2 files changed, 3 insertions(+), 3 deletions(-)
>>>
>>
>> ACK and pushed.
> 
> Thanks.
> I have a question about comment style.
> I see there are two comment styles in our libvirt code.
> 
> One is
> /*  XXXX
>  *  XXXX
>  */
> 
> The other is
> /* XXXX
>  * XXXX */
> 
> Are both of them fine ?
> Or which one is recommended ?
> (I'm not sure about my comments when coding.)

We don't have a written rule.

To me, the second one only looks good with one to three line comments inside
functions.

For comments above function definitions, the first style seems to be preferred.

Jan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140808/8547353d/attachment-0001.sig>


More information about the libvir-list mailing list