On 01/16/2016 12:41 AM, Eric Blake wrote:
On 01/14/2016 08:11 PM, Cao jin wrote:
buf[rc] = 0;
-rc = qemu_strtoul(buf, , base, );
-if (!rc) {
-*pvalue = value;
+rc = qemu_strtoul(buf, , base, (unsigned long *)pvalue);
Ouch. Casting unsigned int * to unsigned long
On 01/14/2016 08:11 PM, Cao jin wrote:
>>> buf[rc] = 0;
>>> -rc = qemu_strtoul(buf, , base, );
>>> -if (!rc) {
>>> -*pvalue = value;
>>> +rc = qemu_strtoul(buf, , base, (unsigned long *)pvalue);
>>
>> Ouch. Casting unsigned int * to unsigned long * and then dereferencing
On 01/13/2016 05:51 AM, Cao jin wrote:
> To catch the error msg. Also modify the caller
>
> Signed-off-by: Cao jin
> ---
> hw/xen/xen-host-pci-device.c | 142
> +--
> hw/xen/xen-host-pci-device.h | 5 +-
> hw/xen/xen_pt.c
On 01/15/2016 06:29 AM, Eric Blake wrote:
On 01/13/2016 05:51 AM, Cao jin wrote:
To catch the error msg. Also modify the caller
Signed-off-by: Cao jin
---
hw/xen/xen-host-pci-device.c | 142 +--