From: Pádraig Brady Date: Thu, 9 Apr 2026 20:36:12 +0000 (+0100) Subject: maint: remove last remaining assert() X-Git-Tag: v9.11~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d0fa892c16d5e3b9b7d42642a698b250b1df992f;p=thirdparty%2Fcoreutils.git maint: remove last remaining assert() * src/split.c (bytes_chunk_extract): Prefer affirm to assert, as it allows for better static checking when compiling with -DNDEBUG. --- diff --git a/src/split.c b/src/split.c index 4786df8279..a8e6f8bf5f 100644 --- a/src/split.c +++ b/src/split.c @@ -1071,7 +1071,7 @@ bytes_chunk_extract (intmax_t k, intmax_t n, char *buf, idx_t bufsize, off_t start; off_t end; - assert (0 < k && k <= n); + affirm (0 < k && k <= n); start = (k - 1) * (file_size / n) + MIN (k - 1, file_size % n); end = k == n ? file_size : k * (file_size / n) + MIN (k, file_size % n);