29 lines
868 B
Diff
29 lines
868 B
Diff
From 0f9e2719e0dd2366f0381daa832f9415f3162af2 Mon Sep 17 00:00:00 2001
|
|
From: Paul Eggert <eggert@cs.ucla.edu>
|
|
Date: Sat, 10 Aug 2024 18:55:09 -0700
|
|
Subject: [PATCH] head: off_t not uintmax_t for file offset
|
|
|
|
* 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 | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/src/head.c b/src/head.c
|
|
index 2795ae486..a9155c24c 100644
|
|
--- a/src/head.c
|
|
+++ b/src/head.c
|
|
@@ -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. */
|
|
--
|
|
2.43.0
|
|
|