Module Name:    src
Committed By:   rillig
Date:           Sat Aug 28 18:58:24 UTC 2021

Modified Files:
        src/usr.bin/xlint/lint1: lex.c

Log Message:
lint: replace obsolete strtouq with equivalent strtoull


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.75 src/usr.bin/xlint/lint1/lex.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/xlint/lint1/lex.c
diff -u src/usr.bin/xlint/lint1/lex.c:1.74 src/usr.bin/xlint/lint1/lex.c:1.75
--- src/usr.bin/xlint/lint1/lex.c:1.74	Sat Aug 28 15:01:43 2021
+++ src/usr.bin/xlint/lint1/lex.c	Sat Aug 28 18:58:24 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: lex.c,v 1.74 2021/08/28 15:01:43 rillig Exp $ */
+/* $NetBSD: lex.c,v 1.75 2021/08/28 18:58:24 rillig Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -38,7 +38,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: lex.c,v 1.74 2021/08/28 15:01:43 rillig Exp $");
+__RCSID("$NetBSD: lex.c,v 1.75 2021/08/28 18:58:24 rillig Exp $");
 #endif
 
 #include <ctype.h>
@@ -512,6 +512,9 @@ lex_integer_constant(const char *yytext,
 	bool	warned = false;
 #ifdef TARG_INT128_MAX
 	__uint128_t uq = 0;
+	/* FIXME: INT128 doesn't belong here. */
+	/* TODO: const */
+	/* TODO: remove #ifdef */
 	static	tspec_t contypes[2][4] = {
 		{ INT,  LONG,  QUAD, INT128, },
 		{ UINT, ULONG, UQUAD, UINT128, }
@@ -561,7 +564,7 @@ lex_integer_constant(const char *yytext,
 
 	errno = 0;
 
-	uq = strtouq(cp, &eptr, base);
+	uq = strtoull(cp, &eptr, base);
 	lint_assert(eptr == cp + len);
 	if (errno != 0) {
 		/* integer constant out of range */

Reply via email to