[Libguestfs] [PATCH nbdkit 1/3] common: isaligned: Use uint64_t instead of unsigned int.

Richard W.M. Jones rjones at redhat.com
Mon Sep 17 15:01:23 UTC 2018


This should have no effect.  However it's probably better to pass the
full type explicitly rather than using an implicit truncation.
---
 common/include/isaligned.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/common/include/isaligned.h b/common/include/isaligned.h
index e693820..9ed635e 100644
--- a/common/include/isaligned.h
+++ b/common/include/isaligned.h
@@ -36,13 +36,14 @@
 
 #include <assert.h>
 #include <stdbool.h>
+#include <stdint.h>
 
 #include "ispowerof2.h"
 
 /* Return true if size is a multiple of align. align must be power of 2.
  */
 static inline bool
-is_aligned (unsigned int size, unsigned int align)
+is_aligned (uint64_t size, unsigned int align)
 {
   assert (is_power_of_2 (align));
   return !(size & (align - 1));
-- 
2.19.0.rc0




More information about the Libguestfs mailing list