[PATCH 2/2] qemuDomainSetInterfaceParameters: use the temporary params variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We have a temporary pointer to the currently processed parameter.
Use it to save three bytes per use.
---
 src/qemu/qemu_driver.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 74da8c3d0..a512f2199 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -10993,22 +10993,22 @@ qemuDomainSetInterfaceParameters(virDomainPtr dom,
         virTypedParameterPtr param = &params[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;
         }
     }
 
-- 
2.13.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux