[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH V8 27/39] vfio-pci: cpr part 1 (fd and dma)
From: |
Steven Sistare |
Subject: |
Re: [PATCH V8 27/39] vfio-pci: cpr part 1 (fd and dma) |
Date: |
Tue, 5 Jul 2022 14:29:35 -0400 |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 |
On 7/3/2022 4:32 AM, Peng Liang wrote:
> On 6/15/2022 10:52 PM, Steve Sistare wrote:
[...]
>> diff --git a/hw/vfio/cpr.c b/hw/vfio/cpr.c
[...]
>> +static int vfio_container_pre_save(void *opaque)
>> +{
>> + VFIOContainer *container = (VFIOContainer *)opaque;
>> + Error *err;
>
> According to the description of error_setg, local Error variables should be
> initialized to NULL. The following coccinelle script from Markus should be
> helpful
> to auto fix the problem :) :
Thanks! I will fix this and the other instances in my code.
- Steve
>
> @ r @
> identifier id;
> @@
> (
> static Error *id;
> |
> Error *id
> + = NULL
> ;
> )
>
[...]