1
0
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:
Eric Blake 2010-08-31 16:43:18 -06:00
parent ff82941604
commit c6e8e26edf
2 changed files with 49 additions and 48 deletions

View File

@ -739,7 +739,8 @@ openvzCopyDefaultConfig(int vpsid)
char conf_file[PATH_MAX]; char conf_file[PATH_MAX];
int ret = -1; 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; goto cleanup;
confdir = openvzLocateConfDir(); confdir = openvzLocateConfDir();
@ -813,8 +814,7 @@ openvz_readline(int fd, char *ptr, int maxlen)
*ptr++ = c; *ptr++ = c;
if (c == '\n') if (c == '\n')
break; break;
} } else if (rc == 0) {
else if(rc == 0) {
if (n == 1) if (n == 1)
return 0; /* EOF condition */ return 0; /* EOF condition */
else else

View File

@ -88,8 +88,7 @@ struct openvz_driver ovz_driver;
static void cmdExecFree(const char *cmdExec[]) static void cmdExecFree(const char *cmdExec[])
{ {
int i=-1; int i=-1;
while(cmdExec[++i]) while (cmdExec[++i]) {
{
VIR_FREE(cmdExec[i]); VIR_FREE(cmdExec[i]);
} }
} }
@ -1405,7 +1404,8 @@ static int openvzListDomains(virConnectPtr conn ATTRIBUTE_UNUSED,
while (got < nids) { while (got < nids) {
ret = openvz_readline(outfd, buf, 32); ret = openvz_readline(outfd, buf, 32);
if(!ret) break; if (!ret)
break;
if (virStrToLong_i(buf, &endptr, 10, &veid) < 0) { if (virStrToLong_i(buf, &endptr, 10, &veid) < 0) {
openvzError(VIR_ERR_INTERNAL_ERROR, openvzError(VIR_ERR_INTERNAL_ERROR,
_("Could not parse VPS ID %s"), buf); _("Could not parse VPS ID %s"), buf);
@ -1451,7 +1451,8 @@ static int openvzListDefinedDomains(virConnectPtr conn ATTRIBUTE_UNUSED,
while (got < nnames) { while (got < nnames) {
ret = openvz_readline(outfd, buf, 32); ret = openvz_readline(outfd, buf, 32);
if(!ret) break; if (!ret)
break;
if (virStrToLong_i(buf, &endptr, 10, &veid) < 0) { if (virStrToLong_i(buf, &endptr, 10, &veid) < 0) {
openvzError(VIR_ERR_INTERNAL_ERROR, openvzError(VIR_ERR_INTERNAL_ERROR,
_("Could not parse VPS ID %s"), buf); _("Could not parse VPS ID %s"), buf);