qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4 2/5] Add Error **errp for xen_host_pci_device


From: Cao jin
Subject: Re: [Qemu-devel] [PATCH v4 2/5] Add Error **errp for xen_host_pci_device_get()
Date: Sat, 9 Jan 2016 19:20:31 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0



On 01/09/2016 06:50 AM, Eric Blake wrote:
On 01/08/2016 01:37 AM, Cao jin wrote:



      buf[rc] = 0;
      rc = qemu_strtoul(buf, &endptr, base, &value);

Do you still need a local 'value' variable, or can you just reuse pvalue
here?


I guess so, or else it won`t compile, because, *pvalue* is int*, *value* is
unsigned long*, and qemu_strtoul() require a unsigned long* for the last param. And I guess that is why author use a local 'value'. I just want to make the patch
small for the reviewer, so I reuse most of original code.

but yes, maybe it can be:
rc = qemu_strtoul(buf, &endptr, base, (unsigned long *)pvalue);

--
Yours Sincerely,

Cao jin





reply via email to

[Prev in Thread] Current Thread [Next in Thread]