mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-20 11:48:28 -06:00
Fix syntax-check errors
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
e6458393ab
commit
95a515fc44
@ -162,10 +162,10 @@ int linuxNodeInfoCPUPopulate(virConnectPtr conn, FILE *cpuinfo,
|
|||||||
nodeinfo->cores = 1;
|
nodeinfo->cores = 1;
|
||||||
|
|
||||||
nodeinfo->nodes = 1;
|
nodeinfo->nodes = 1;
|
||||||
#if HAVE_NUMACTL
|
# if HAVE_NUMACTL
|
||||||
if (numa_available() >= 0)
|
if (numa_available() >= 0)
|
||||||
nodeinfo->nodes = numa_max_node() + 1;
|
nodeinfo->nodes = numa_max_node() + 1;
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
/* NB: It is impossible to fill our nodes, since cpuinfo
|
/* NB: It is impossible to fill our nodes, since cpuinfo
|
||||||
* has no knowledge of NUMA nodes */
|
* has no knowledge of NUMA nodes */
|
||||||
|
@ -1716,11 +1716,11 @@ write_func(void *ptr, size_t size, size_t nmemb, void *comms_)
|
|||||||
{
|
{
|
||||||
xen_comms *comms = comms_;
|
xen_comms *comms = comms_;
|
||||||
size_t n = size * nmemb;
|
size_t n = size * nmemb;
|
||||||
#ifdef PRINT_XML
|
#ifdef PRINT_XML
|
||||||
printf("\n\n---Result from server -----------------------\n");
|
printf("\n\n---Result from server -----------------------\n");
|
||||||
printf("%s\n",((char*) ptr));
|
printf("%s\n",((char*) ptr));
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
#endif
|
#endif
|
||||||
return (size_t) (comms->func(ptr, n, comms->handle) ? n : 0);
|
return (size_t) (comms->func(ptr, n, comms->handle) ? n : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1734,12 +1734,11 @@ call_func(const void *data, size_t len, void *user_handle,
|
|||||||
{
|
{
|
||||||
//(void)user_handle;
|
//(void)user_handle;
|
||||||
struct _xenapiPrivate *priv = (struct _xenapiPrivate *)user_handle;
|
struct _xenapiPrivate *priv = (struct _xenapiPrivate *)user_handle;
|
||||||
#ifdef PRINT_XML
|
#ifdef PRINT_XML
|
||||||
|
printf("\n\n---Data to server: -----------------------\n");
|
||||||
printf("\n\n---Data to server: -----------------------\n");
|
printf("%s\n",((char*) data));
|
||||||
printf("%s\n",((char*) data));
|
fflush(stdout);
|
||||||
fflush(stdout);
|
#endif
|
||||||
#endif
|
|
||||||
CURL *curl = curl_easy_init();
|
CURL *curl = curl_easy_init();
|
||||||
if (!curl) {
|
if (!curl) {
|
||||||
return -1;
|
return -1;
|
||||||
@ -1750,9 +1749,9 @@ call_func(const void *data, size_t len, void *user_handle,
|
|||||||
};
|
};
|
||||||
curl_easy_setopt(curl, CURLOPT_URL, priv->url);
|
curl_easy_setopt(curl, CURLOPT_URL, priv->url);
|
||||||
curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 1);
|
curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 1);
|
||||||
#ifdef CURLOPT_MUTE
|
#ifdef CURLOPT_MUTE
|
||||||
curl_easy_setopt(curl, CURLOPT_MUTE, 1);
|
curl_easy_setopt(curl, CURLOPT_MUTE, 1);
|
||||||
#endif
|
#endif
|
||||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, &write_func);
|
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, &write_func);
|
||||||
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &comms);
|
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &comms);
|
||||||
curl_easy_setopt(curl, CURLOPT_POST, 1);
|
curl_easy_setopt(curl, CURLOPT_POST, 1);
|
||||||
|
@ -548,7 +548,7 @@ createVMRecordFromXml (virConnectPtr conn, virDomainDefPtr def,
|
|||||||
char macStr[VIR_MAC_STRING_BUFLEN];
|
char macStr[VIR_MAC_STRING_BUFLEN];
|
||||||
virFormatMacAddr(def->nets[i]->mac, macStr);
|
virFormatMacAddr(def->nets[i]->mac, macStr);
|
||||||
if (!(mac = strdup(macStr))) {
|
if (!(mac = strdup(macStr))) {
|
||||||
if (bridge) VIR_FREE(bridge);
|
VIR_FREE(bridge);
|
||||||
goto error_cleanup;
|
goto error_cleanup;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -559,7 +559,7 @@ createVMRecordFromXml (virConnectPtr conn, virDomainDefPtr def,
|
|||||||
VIR_FREE(bridge);
|
VIR_FREE(bridge);
|
||||||
device_number++;
|
device_number++;
|
||||||
}
|
}
|
||||||
if (bridge) VIR_FREE(bridge);
|
VIR_FREE(bridge);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user