chiark / gitweb /
Change file size type to unsigned long long
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 15 Aug 2024 21:20:59 +0000 (22:20 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 15 Aug 2024 21:25:25 +0000 (22:25 +0100)
C99 broke this program.  This fixes it.

I have tested that with this change, my repro for #1075821 is gone.

Closes: #1075821
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
cprogs/summer.c

index 226fed14b1e154b80c58a1c5510289ae12c83fcd..412b1758cdb74944bed9905f900a81d4f3f7cdb5 100644 (file)
@@ -260,8 +260,8 @@ static void node(const char *path, unsigned nodeflags, dev_t fs) {
     if (S_ISDIR(stab->st_mode) && hidedirsize)
       printf(" %10s","dir");
     else
-      printf(" %10lu", 
-            (unsigned long)stab->st_size);
+      printf(" %10llu", 
+            (unsigned long long)stab->st_size);
 
     printf(" %4o %10ld %10ld",
           (unsigned)stab->st_mode & 07777U,