]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
maint: remove some unnecessary casts
authorCollin Funk <collin.funk1@gmail.com>
Tue, 24 Mar 2026 02:32:21 +0000 (19:32 -0700)
committerCollin Funk <collin.funk1@gmail.com>
Tue, 24 Mar 2026 02:32:21 +0000 (19:32 -0700)
* src/sort.c (begfield, limfield): Remove size_t casts.

src/sort.c

index aaab47b50e0e0dfdb1c4e1750e68fcc6da3da1b9..510c674d9da5af99b3677fec7198b4302595b4a5 100644 (file)
@@ -1725,7 +1725,7 @@ begfield (struct line const *line, struct keyfield const *key)
   if (tab != TAB_DEFAULT)
     while (ptr < lim && sword--)
       {
-        char *sep = memchr (ptr, tab, (size_t) (lim - ptr));
+        char *sep = memchr (ptr, tab, lim - ptr);
         ptr = sep ? sep : lim;
         if (ptr < lim)
           ++ptr;
@@ -1778,7 +1778,7 @@ limfield (struct line const *line, struct keyfield const *key)
   if (tab != TAB_DEFAULT)
     while (ptr < lim && eword--)
       {
-        char *sep = memchr (ptr, tab, (size_t) (lim - ptr));
+        char *sep = memchr (ptr, tab, lim - ptr);
         ptr = sep ? sep : lim;
         if (ptr < lim && (eword || echar))
           ++ptr;