On 1/26/20 2:21 PM, Sanjeev Gupta wrote:> I think we should wait for
Bernd to chime in.
That is just the fix for the change before - unsigned long is still not
64bit on 32bit. I can't remember how I stumbled across it, but I guess
some tool pointed it out.
After looking at the code again - I have no idea why there is something
else than a simple int needed.
commit b1b555e0cb37382655a3a7cb37f2f89cb89eda7a
Author: Gary E. Miller <address@hidden>
Date: Thu Oct 10 12:19:28 2019 -0700
monitor_italk.c: 32-bit unsigned too small by one.
Problem found by cpplint
diff --git a/monitor_italk.c b/monitor_italk.c
index 8da7e17ea..6ee79cbf0 100644
--- a/monitor_italk.c
+++ b/monitor_italk.c
@@ -160,11 +160,11 @@ static void display_itk_navfix(unsigned char *buf,
size_t len)
(void)wmove(navfixwin, 11, 6);
{
char prn[4], satlist[38];
- unsigned int i;
+ unsigned long i; // unsigned long just in case ints are
32-bit
satlist[0] = '\0';
for (i = 0; i < 32; i++) {
if (svlist & (1 << i)) {
- (void)snprintf(prn, 4, "%u ", i + 1);
+ (void)snprintf(prn, 4, "%lu ", i + 1);
(void)strlcat(satlist, prn, sizeof(satlist));
}
}
--
Sanjeev