]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
head: off_t not uintmax_t for file offset
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 11 Aug 2024 01:55:09 +0000 (18:55 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 11 Aug 2024 02:30:01 +0000 (19:30 -0700)
* src/head.c (elide_tail_lines_pipe):
Use off_t, not uintmax_t, for a local var that is
a file offset.

src/head.c

index 2795ae486f88155434e60df3b7bac099085e3f19..a9155c24c787dedfd6d0b2dba30ddae956834bfe 100644 (file)
@@ -504,7 +504,7 @@ elide_tail_lines_pipe (char const *filename, int fd, uintmax_t n_elide,
     size_t nlines;
     struct linebuffer *next;
   };
-  uintmax_t desired_pos = current_pos;
+  off_t desired_pos = current_pos;
   typedef struct linebuffer LBUFFER;
   LBUFFER *first, *last, *tmp;
   size_t total_lines = 0;      /* Total number of newlines in all buffers.  */