[PATCH 2/3] virbuffer: Use signed integer for storing error

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

 



The @error member can contain a positive value (errno) or a
negative value (-1) to denote an usage error. It doesn't make
much sense to store it as unsigned then.

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 src/util/virbuffer.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/virbuffer.h b/src/util/virbuffer.h
index fbfed5cbf3..dd9d4ab3d4 100644
--- a/src/util/virbuffer.h
+++ b/src/util/virbuffer.h
@@ -40,7 +40,7 @@ typedef virBuffer *virBufferPtr;
 struct _virBuffer {
     size_t size;
     size_t use;
-    unsigned int error; /* errno value, or -1 for usage error */
+    int error; /* errno value, or -1 for usage error */
     int indent;
     char *content;
 };
-- 
2.21.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