From: Cao jin <caoj.fnst@cn.fujitsu.com>
To: Eric Blake <eblake@redhat.com>, qemu-devel@nongnu.org
Cc: Markus Armbruster <armbru@redhat.com>, stefano.stabellini@eu.citrix.com
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 [thread overview]
Message-ID: <5690ECFF.1060004@cn.fujitsu.com> (raw)
In-Reply-To: <56903D34.2020204@redhat.com>
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
next prev parent reply other threads:[~2016-01-09 11:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-08 8:37 [Qemu-devel] [PATCH v4 0/5] Xen PCI passthru: Convert to realize() Cao jin
2016-01-08 8:37 ` [Qemu-devel] [PATCH v4 1/5] Use qemu_strtoul instead of strtol Cao jin
2016-01-08 17:35 ` Eric Blake
2016-01-09 9:42 ` Cao jin
2016-01-08 8:37 ` [Qemu-devel] [PATCH v4 2/5] Add Error **errp for xen_host_pci_device_get() Cao jin
2016-01-08 22:50 ` Eric Blake
2016-01-09 10:49 ` Cao jin
2016-01-09 11:20 ` Cao jin [this message]
2016-01-08 8:37 ` [Qemu-devel] [PATCH v4 3/5] Add Error **errp for xen_pt_setup_vga() Cao jin
2016-01-08 8:37 ` [Qemu-devel] [PATCH v4 4/5] Add Error **errp for xen_pt_config_init() Cao jin
2016-01-08 8:37 ` [Qemu-devel] [PATCH v4 5/5] Xen PCI passthru: convert to realize() Cao jin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5690ECFF.1060004@cn.fujitsu.com \
--to=caoj.fnst@cn.fujitsu.com \
--cc=armbru@redhat.com \
--cc=eblake@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefano.stabellini@eu.citrix.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).