Signed-off-by: Andrea Bastoni <[email protected]>
---
 inmates/lib/printk.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/inmates/lib/printk.c b/inmates/lib/printk.c
index 45af2730..712a9b44 100644
--- a/inmates/lib/printk.c
+++ b/inmates/lib/printk.c
@@ -207,11 +207,12 @@ static char *hex2str(unsigned long long value, char *buf,
        return buf;
 }
 
-static char *align(char *p1, char *p0, unsigned long width, char fill)
+static char *align(char *p1, char *p0, unsigned int width, char fill)
 {
        unsigned int n;
 
-       if (p1 - p0 >= width)
+       /* Note: p1 > p0 here */
+       if ((unsigned int)(p1 - p0) >= width)
                return p1;
 
        for (n = 1; p1 - n >= p0; n++)
-- 
2.28.0

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jailhouse-dev/20201028210933.138379-7-andrea.bastoni%40tum.de.

Reply via email to