[libvirt] [PATCH 14/30] Remove virConnectPtr from nodeReportError
Eric Blake
eblake at redhat.com
Mon Apr 5 16:42:03 UTC 2010
On 04/04/2010 11:36 AM, Matthias Bolte wrote:
> ---
> src/nodeinfo.c | 47 +++++++++++++++++++++++------------------------
> tests/nodeinfotest.c | 4 ++--
> 2 files changed, 25 insertions(+), 26 deletions(-)
>
> diff --git a/src/nodeinfo.c b/src/nodeinfo.c
> index 4858e71..402a6b7 100644
> --- a/src/nodeinfo.c
> +++ b/src/nodeinfo.c
> @@ -51,8 +51,8 @@
>
> #define VIR_FROM_THIS VIR_FROM_NONE
>
> -#define nodeReportError(conn, code, ...) \
> - virReportErrorHelper(conn, VIR_FROM_NONE, code, __FILE__, \
> +#define nodeReportError(code, ...) \
> + virReportErrorHelper(NULL, VIR_FROM_NONE, code, __FILE__, \
> __FUNCTION__, __LINE__, __VA_ARGS__)
ACK, and the rest of the patch is mechanical fallout.
>
> #ifdef __linux__
> @@ -60,7 +60,7 @@
> # define CPU_SYS_PATH "/sys/devices/system/cpu"
>
> /* NB, this is not static as we need to call it from the testsuite */
> -int linuxNodeInfoCPUPopulate(virConnectPtr conn, FILE *cpuinfo,
> +int linuxNodeInfoCPUPopulate(FILE *cpuinfo,
> virNodeInfoPtr nodeinfo);
...
> +++ b/tests/nodeinfotest.c
> @@ -25,7 +25,7 @@ static char *abs_srcdir;
>
> # define MAX_FILE 4096
>
> -extern int linuxNodeInfoCPUPopulate(virConnectPtr conn, FILE *cpuinfo, virNodeInfoPtr nodeinfo);
> +extern int linuxNodeInfoCPUPopulate(FILE *cpuinfo, virNodeInfoPtr nodeinfo);
Independent question: is it worth putting this declaration in a .h, to
enforce the consistency via the compiler, rather than just relying on
the comment?
--
Eric Blake eblake at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 323 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20100405/23562869/attachment-0001.sig>
More information about the libvir-list
mailing list