]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
expand: use signed colno
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 7 Nov 2024 02:04:35 +0000 (18:04 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 9 Nov 2024 07:41:18 +0000 (23:41 -0800)
* src/expand-common.h (colno): Now intmax_t, not uintmax_t.

src/expand-common.h

index 5b20d018a6663c1c40ea68c70b7d805b62ed955e..faca01013f3b430aabce80a7207ca93b9353cc0f 100644 (file)
@@ -15,8 +15,9 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
-/* Column numbers are nonnegative, with the leftmost column being zero.  */
-typedef uintmax_t colno;
+/* Column numbers are nonnegative, with the leftmost column being zero.
+   Use a signed type, as that allows for better checking.  */
+typedef intmax_t colno;
 
 /* If true, convert blanks even after nonblank characters have been
    read on the line.  */