[PATCH] qemu: use better types

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

 



* src/qemu/qemu_driver.c (qemudFindDisk): Mark parameter const.
(qemudShrinkDisks): Mark parameter unsigned.
---

>> +static inline int qemudFindDisk(virDomainDefPtr def, char *dst)
> 
> dst can be const char *.
> 
>> +static inline void qemudShrinkDisks(virDomainDefPtr def, int i)
> 
> And i can be unsigned (better yet, size_t).
> 
> But since this is just code motion for future use, it looks fine to me.
>  ACK, and I went ahead and pushed it with those edits.
> 

Silly me; I made the changes in my editor, but did not save them, so I
ended up pushing your patch as written.  I'm pushing this followup as
trivial, to match my intentions.

 src/qemu/qemu_driver.c | 4 ++-- 1 files changed, 2 insertions(+), 2
 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 90b9089..cbf6602 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -7866,7 +7866,7 @@ cleanup:
 }


-static inline int qemudFindDisk(virDomainDefPtr def, char *dst)
+static inline int qemudFindDisk(virDomainDefPtr def, const char *dst)
 {
     int i;

@@ -7879,7 +7879,7 @@ static inline int qemudFindDisk(virDomainDefPtr def, char *dst)
     return -1;
 }

-static inline void qemudShrinkDisks(virDomainDefPtr def, int i)
+static inline void qemudShrinkDisks(virDomainDefPtr def, size_t i)
 {
     if (def->ndisks > 1) {
         memmove(def->disks + i,
-- 
1.6.6.1

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