[libvirt PATCH 1/5] Do not check if unsigned vars are less than zero

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

 



Signed-off-by: Ján Tomko <jtomko@xxxxxxxxxx>
---
 src/esx/esx_stream.c | 2 +-
 src/libvirt-qemu.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/esx/esx_stream.c b/src/esx/esx_stream.c
index b356fbed70..51c96ff0e0 100644
--- a/src/esx/esx_stream.c
+++ b/src/esx/esx_stream.c
@@ -287,7 +287,7 @@ esxStreamRecvFlags(virStreamPtr stream,
             if (esxStreamTransfer(priv, false) < 0)
                 return -1;
 
-            if (priv->buffer_used <= 0)
+            if (priv->buffer_used == 0)
                 return -2;
         } else /* blocking */ {
             do {
diff --git a/src/libvirt-qemu.c b/src/libvirt-qemu.c
index 3cd8c8f745..5020b5dc1b 100644
--- a/src/libvirt-qemu.c
+++ b/src/libvirt-qemu.c
@@ -233,7 +233,7 @@ virDomainQemuAttach(virConnectPtr conn,
     virResetLastError();
 
     virCheckConnectReturn(conn, NULL);
-    virCheckPositiveArgGoto(pid_value, error);
+    virCheckNonZeroArgGoto(pid_value, error);
     if (pid != pid_value) {
         virReportInvalidArg(pid_value,
                             _("pid_value in %s is too large"),
-- 
2.34.1




[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