mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-23 13:05:27 +00:00
maint: fix comma style issues: util
Most of our code base uses space after comma but not before; fix the remaining uses before adding a syntax check. * src/util/vircommand.c: Consistently use commas. * src/util/virlog.c: Likewise. * src/util/virnetdevbandwidth.c: Likewise. * src/util/virnetdevmacvlan.c: Likewise. * src/util/virnetdevvportprofile.c: Likewise. * src/util/virnetlink.c: Likewise. * src/util/virpci.c: Likewise. * src/util/virsysinfo.c: Likewise. * src/util/virusb.c: Likewise. Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
57682aea36
commit
c7c84fa54a
@ -399,8 +399,8 @@ virExec(virCommandPtr cmd)
|
||||
{
|
||||
pid_t pid;
|
||||
int null = -1, fd, openmax;
|
||||
int pipeout[2] = {-1,-1};
|
||||
int pipeerr[2] = {-1,-1};
|
||||
int pipeout[2] = {-1, -1};
|
||||
int pipeerr[2] = {-1, -1};
|
||||
int childin = cmd->infd;
|
||||
int childout = -1;
|
||||
int childerr = -1;
|
||||
|
@ -1183,7 +1183,7 @@ virLogOutputToJournald(virLogSource source,
|
||||
state.bufs = iov_bufs;
|
||||
state.bufs_end = iov_bufs + ARRAY_CARDINALITY(iov_bufs);
|
||||
|
||||
journalAddString(&state ,"MESSAGE", rawstr);
|
||||
journalAddString(&state, "MESSAGE", rawstr);
|
||||
journalAddInt(&state, "PRIORITY", priority);
|
||||
journalAddString(&state, "LIBVIRT_SOURCE",
|
||||
virLogSourceTypeToString(source));
|
||||
|
@ -167,7 +167,7 @@ virNetDevBandwidthSet(const char *ifname,
|
||||
}
|
||||
virCommandFree(cmd);
|
||||
cmd = virCommandNew(TC);
|
||||
virCommandAddArgList(cmd,"class", "add", "dev", ifname, "parent",
|
||||
virCommandAddArgList(cmd, "class", "add", "dev", ifname, "parent",
|
||||
hierarchical_class ? "1:1" : "1:", "classid",
|
||||
hierarchical_class ? "1:2" : "1:1", "htb",
|
||||
"rate", average, NULL);
|
||||
@ -192,7 +192,7 @@ virNetDevBandwidthSet(const char *ifname,
|
||||
|
||||
virCommandFree(cmd);
|
||||
cmd = virCommandNew(TC);
|
||||
virCommandAddArgList(cmd,"filter", "add", "dev", ifname, "parent",
|
||||
virCommandAddArgList(cmd, "filter", "add", "dev", ifname, "parent",
|
||||
"1:0", "protocol", "ip", "handle", "1", "fw",
|
||||
"flowid", "1", NULL);
|
||||
|
||||
|
@ -332,7 +332,7 @@ int virNetDevMacVLanTapOpen(const char *ifname,
|
||||
|
||||
if (fscanf(file, "%d", &ifindex) != 1) {
|
||||
virReportSystemError(errno,
|
||||
"%s",_("cannot determine macvtap's tap device "
|
||||
"%s", _("cannot determine macvtap's tap device "
|
||||
"interface index"));
|
||||
VIR_FORCE_FCLOSE(file);
|
||||
return -1;
|
||||
|
@ -841,7 +841,7 @@ virNetDevVPortProfileOpCommon(const char *ifname, int ifindex,
|
||||
int rc;
|
||||
int src_pid = 0;
|
||||
uint32_t dst_pid = 0;
|
||||
struct nlattr *tb[IFLA_MAX + 1] = { NULL , };
|
||||
struct nlattr *tb[IFLA_MAX + 1] = { NULL, };
|
||||
int repeats = STATUS_POLL_TIMEOUT_USEC / STATUS_POLL_INTERVL_USEC;
|
||||
uint16_t status = 0;
|
||||
bool is8021Qbg = (profileId == NULL);
|
||||
|
@ -660,7 +660,7 @@ addentry:
|
||||
virMacAddrSet(&srv->handles[r].macaddr, macaddr);
|
||||
else
|
||||
virMacAddrSetRaw(&srv->handles[r].macaddr,
|
||||
(unsigned char[VIR_MAC_BUFLEN]){0,0,0,0,0,0});
|
||||
(unsigned char[VIR_MAC_BUFLEN]){0, 0, 0, 0, 0, 0});
|
||||
|
||||
VIR_DEBUG("added client to loop slot: %d. with macaddr ptr=%p", r, macaddr);
|
||||
|
||||
|
@ -374,7 +374,8 @@ virPCIDeviceWrite32(virPCIDevicePtr dev, int cfgfd, unsigned int pos, uint32_t v
|
||||
virPCIDeviceWrite(dev, cfgfd, pos, &buf[0], sizeof(buf));
|
||||
}
|
||||
|
||||
typedef int (*virPCIDeviceIterPredicate)(virPCIDevicePtr , virPCIDevicePtr , void *);
|
||||
typedef int (*virPCIDeviceIterPredicate)(virPCIDevicePtr, virPCIDevicePtr,
|
||||
void *);
|
||||
|
||||
/* Iterate over available PCI devices calling @predicate
|
||||
* to compare each one to @dev.
|
||||
|
@ -756,7 +756,7 @@ virSysinfoParseMemory(const char *base, virSysinfoDefPtr ret)
|
||||
cur += 9;
|
||||
eol = strchr(cur, '\n');
|
||||
virSkipSpacesBackwards(cur, &eol);
|
||||
if (eol && VIR_STRNDUP(memory->memory_locator,cur, eol - cur) < 0)
|
||||
if (eol && VIR_STRNDUP(memory->memory_locator, cur, eol - cur) < 0)
|
||||
return -1;
|
||||
}
|
||||
if ((cur = strstr(base, "Bank Locator: ")) != NULL) {
|
||||
|
@ -216,7 +216,7 @@ virUSBDeviceFindByVendor(unsigned int vendor,
|
||||
virUSBDeviceListPtr list;
|
||||
int count;
|
||||
|
||||
if (!(list = virUSBDeviceSearch(vendor, product, 0 , 0,
|
||||
if (!(list = virUSBDeviceSearch(vendor, product, 0, 0,
|
||||
vroot,
|
||||
USB_DEVICE_FIND_BY_VENDOR)))
|
||||
return -1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user