mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
openvz: formatting cleanups
* src/openvz/openvz_conf.c: Whitespace fixes. * src/openvz/openvz_driver.c: Likewise.
This commit is contained in:
parent
ff82941604
commit
c6e8e26edf
@ -739,7 +739,8 @@ openvzCopyDefaultConfig(int vpsid)
|
||||
char conf_file[PATH_MAX];
|
||||
int ret = -1;
|
||||
|
||||
if(openvzReadConfigParam(VZ_CONF_FILE, "CONFIGFILE", configfile_value, PATH_MAX) < 0)
|
||||
if (openvzReadConfigParam(VZ_CONF_FILE, "CONFIGFILE", configfile_value,
|
||||
PATH_MAX) < 0)
|
||||
goto cleanup;
|
||||
|
||||
confdir = openvzLocateConfDir();
|
||||
@ -813,8 +814,7 @@ openvz_readline(int fd, char *ptr, int maxlen)
|
||||
*ptr++ = c;
|
||||
if (c == '\n')
|
||||
break;
|
||||
}
|
||||
else if(rc == 0) {
|
||||
} else if (rc == 0) {
|
||||
if (n == 1)
|
||||
return 0; /* EOF condition */
|
||||
else
|
||||
|
@ -88,8 +88,7 @@ struct openvz_driver ovz_driver;
|
||||
static void cmdExecFree(const char *cmdExec[])
|
||||
{
|
||||
int i=-1;
|
||||
while(cmdExec[++i])
|
||||
{
|
||||
while (cmdExec[++i]) {
|
||||
VIR_FREE(cmdExec[i]);
|
||||
}
|
||||
}
|
||||
@ -1405,7 +1404,8 @@ static int openvzListDomains(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
|
||||
while (got < nids) {
|
||||
ret = openvz_readline(outfd, buf, 32);
|
||||
if(!ret) break;
|
||||
if (!ret)
|
||||
break;
|
||||
if (virStrToLong_i(buf, &endptr, 10, &veid) < 0) {
|
||||
openvzError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("Could not parse VPS ID %s"), buf);
|
||||
@ -1451,7 +1451,8 @@ static int openvzListDefinedDomains(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||
|
||||
while (got < nnames) {
|
||||
ret = openvz_readline(outfd, buf, 32);
|
||||
if(!ret) break;
|
||||
if (!ret)
|
||||
break;
|
||||
if (virStrToLong_i(buf, &endptr, 10, &veid) < 0) {
|
||||
openvzError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("Could not parse VPS ID %s"), buf);
|
||||
|
Loading…
x
Reference in New Issue
Block a user