Am 12.11.2009 17:46, schrieb Anthony Liguori:
> Kevin Wolf wrote:
>> Am 11.11.2009 18:28, schrieb Anthony Liguori:
>>   
>>> This makes lists no longer invariant. It's a very useful bit of 
>>> functionality
>>> though.
>>>
>>> To deal with the fact that lists are no longer invariant, introduce a deep
>>> copy mechanism for lists.
>>>
>>> Signed-off-by: Anthony Liguori <aligu...@us.ibm.com>
>>> ---
>>>  qlist.c |   56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>>  qlist.h |    4 ++++
>>>  2 files changed, 60 insertions(+), 0 deletions(-)
>>>     
>>
>> So far all functions in qlist.c have a header comment. Any reason to
>> change this?
>>   
> 
> But nothing else in qemu does.

Unfortunately. There are places where such comments could be a good
specification on what an interface is actually meant to work like
(particularly in error cases). Currently you often can't tell if the
implementation or the caller of a function is buggy.

Not sure if they are really useful for the simple qlist.c functions (but
even there the function name does not tell me what it's doing with NULL
parameters), but it might be helpful to have a general discussion about
it. I think in general qemu is poorly commented.

Kevin


Reply via email to