Re: [PATCH 4/3] conf: Avoid double assignment in virDomainDiskRemove

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

 



On 04/13/2012 05:24 PM, Michal Privoznik wrote:
Although it should be harmless to do:
     disk = disk = def->disks[i]
some not-so-wise compilers may fool around.
Besides, such assignment is useless here.
---
  src/conf/domain_conf.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index c6b97e1..a9c5cbc 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -7124,7 +7124,7 @@ void virDomainDiskInsertPreAlloced(virDomainDefPtr def,
  virDomainDiskDefPtr
  virDomainDiskRemove(virDomainDefPtr def, size_t i)
  {
-    virDomainDiskDefPtr disk = disk = def->disks[i];
+    virDomainDiskDefPtr disk = def->disks[i];

      if (def->ndisks>  1) {
          memmove(def->disks + i,

ACK

--
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]