]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tail: check OFF_T_MAX vs COPY_A_BUFFER
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 27 Jul 2025 19:36:53 +0000 (12:36 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 4 Aug 2025 02:48:04 +0000 (19:48 -0700)
* src/tail.c: Document an otherwise-unstated assumption.

src/tail.c

index 255f581fa14c3745a6352707e8727d6535d9a862..8dd03a7c4d826973b20223d94baba80f78e32f4d 100644 (file)
@@ -81,6 +81,7 @@
 /* Special values for dump_remainder's N_BYTES parameter.  */
 #define COPY_TO_EOF UINTMAX_MAX
 #define COPY_A_BUFFER (UINTMAX_MAX - 1)
+static_assert (OFF_T_MAX < COPY_A_BUFFER);
 
 /* FIXME: make Follow_name the default?  */
 #define DEFAULT_FOLLOW_MODE Follow_descriptor