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

[libvirt] [PATCH] qemu: use better types



* 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


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