aboutsummaryrefslogtreecommitdiff
path: root/toys
diff options
context:
space:
mode:
Diffstat (limited to 'toys')
-rw-r--r--toys/net/sntp.c2
-rw-r--r--toys/posix/file.c2
-rw-r--r--toys/posix/tar.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/toys/net/sntp.c b/toys/net/sntp.c
index 15e74440..ab6a6031 100644
--- a/toys/net/sntp.c
+++ b/toys/net/sntp.c
@@ -39,7 +39,7 @@ GLOBALS(
)
// Seconds from 1900 to 1970, including appropriate leap days
-#define SEVENTIES 2208988800L
+#define SEVENTIES 2208988800UL
// Get time and return ntptime (saving timespec in pointer if not null)
// NTP time is high 32 bits = seconds since 1970 (blame RFC 868), low 32 bits
diff --git a/toys/posix/file.c b/toys/posix/file.c
index 063397ce..5d6eef12 100644
--- a/toys/posix/file.c
+++ b/toys/posix/file.c
@@ -284,7 +284,7 @@ static void do_regular_file(int fd, char *name)
xputc('\n');
} else if (len>4 && strstart(&s, "BZh") && isdigit(*s))
xprintf("bzip2 compressed data, block size = %c00k\n", *s);
- else if (len > 31 && peek_be(s, 7) == 0xfd377a585a0000)
+ else if (len > 31 && peek_be(s, 7) == 0xfd377a585a0000UL)
xputs("xz compressed data");
else if (len>10 && strstart(&s, "\x1f\x8b")) xputs("gzip compressed data");
else if (len>32 && !memcmp(s+1, "\xfa\xed\xfe", 3)) {
diff --git a/toys/posix/tar.c b/toys/posix/tar.c
index ff129819..1e662589 100644
--- a/toys/posix/tar.c
+++ b/toys/posix/tar.c
@@ -848,7 +848,7 @@ void tar_main(void)
// detect gzip and bzip signatures
if (SWAP_BE16(*(short *)hdr)==0x1f8b) toys.optflags |= FLAG_z;
else if (!memcmp(hdr, "BZh", 3)) toys.optflags |= FLAG_j;
- else if (peek_be(hdr, 7) == 0xfd377a585a0000) toys.optflags |= FLAG_J;
+ else if (peek_be(hdr, 7) == 0xfd377a585a0000UL) toys.optflags |= FLAG_J;
else error_exit("Not tar");
// if we can seek back we don't need to loop and copy data