mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 14:57:42 +00:00
qemuDomainSetInterfaceParameters: use the temporary params variable
We have a temporary pointer to the currently processed parameter. Use it to save three bytes per use.
This commit is contained in:
parent
38cc22ea00
commit
65bb16d9e8
@ -10993,22 +10993,22 @@ qemuDomainSetInterfaceParameters(virDomainPtr dom,
|
||||
virTypedParameterPtr param = ¶ms[i];
|
||||
|
||||
if (STREQ(param->field, VIR_DOMAIN_BANDWIDTH_IN_AVERAGE)) {
|
||||
bandwidth->in->average = params[i].value.ui;
|
||||
bandwidth->in->average = param->value.ui;
|
||||
inboundSpecified = true;
|
||||
} else if (STREQ(param->field, VIR_DOMAIN_BANDWIDTH_IN_PEAK)) {
|
||||
bandwidth->in->peak = params[i].value.ui;
|
||||
bandwidth->in->peak = param->value.ui;
|
||||
} else if (STREQ(param->field, VIR_DOMAIN_BANDWIDTH_IN_BURST)) {
|
||||
bandwidth->in->burst = params[i].value.ui;
|
||||
bandwidth->in->burst = param->value.ui;
|
||||
} else if (STREQ(param->field, VIR_DOMAIN_BANDWIDTH_IN_FLOOR)) {
|
||||
bandwidth->in->floor = params[i].value.ui;
|
||||
bandwidth->in->floor = param->value.ui;
|
||||
inboundSpecified = true;
|
||||
} else if (STREQ(param->field, VIR_DOMAIN_BANDWIDTH_OUT_AVERAGE)) {
|
||||
bandwidth->out->average = params[i].value.ui;
|
||||
bandwidth->out->average = param->value.ui;
|
||||
outboundSpecified = true;
|
||||
} else if (STREQ(param->field, VIR_DOMAIN_BANDWIDTH_OUT_PEAK)) {
|
||||
bandwidth->out->peak = params[i].value.ui;
|
||||
bandwidth->out->peak = param->value.ui;
|
||||
} else if (STREQ(param->field, VIR_DOMAIN_BANDWIDTH_OUT_BURST)) {
|
||||
bandwidth->out->burst = params[i].value.ui;
|
||||
bandwidth->out->burst = param->value.ui;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user