summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2019-02-13 22:57:09 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2019-02-13 22:57:09 +0000
commit6441905bfeadbf0368fbc36fe6e83edbb69f00cc (patch)
tree6c4e63a5ad6c7428885d4b20bec9ed07a40e4357
parent9413373390f5ee708253a32ce47ecee80a45b2bc (diff)
(unsigned) means (unsigned int) which on ptrdiff_t or size_t or other
larger types really is a range reduction... Almost any cast to (unsigned) is a bug. ok millert tb benno
-rw-r--r--bin/chio/parse.y6
-rw-r--r--sbin/iked/parse.y6
-rw-r--r--sbin/ipsecctl/parse.y6
-rw-r--r--sbin/pfctl/parse.y6
-rw-r--r--sbin/unwind/uw_parse.y6
-rw-r--r--usr.sbin/acme-client/parse.y6
-rw-r--r--usr.sbin/bgpd/parse.y6
-rw-r--r--usr.sbin/dvmrpd/parse.y6
-rw-r--r--usr.sbin/eigrpd/parse.y6
-rw-r--r--usr.sbin/hostapd/parse.y6
-rw-r--r--usr.sbin/httpd/parse.y6
-rw-r--r--usr.sbin/ifstated/parse.y6
-rw-r--r--usr.sbin/iscsictl/parse.y6
-rw-r--r--usr.sbin/ldapd/parse.y6
-rw-r--r--usr.sbin/ldapd/schema.c4
-rw-r--r--usr.sbin/ldomctl/parse.y6
-rw-r--r--usr.sbin/ldpd/parse.y6
-rw-r--r--usr.sbin/lpd/parse.y6
-rw-r--r--usr.sbin/npppd/npppd/parse.y6
-rw-r--r--usr.sbin/ntpd/parse.y6
-rw-r--r--usr.sbin/ospf6d/parse.y6
-rw-r--r--usr.sbin/ospfd/parse.y6
-rw-r--r--usr.sbin/rad/parse.y6
-rw-r--r--usr.sbin/radiusd/parse.y6
-rw-r--r--usr.sbin/relayd/parse.y6
-rw-r--r--usr.sbin/ripd/parse.y6
-rw-r--r--usr.sbin/smtpd/parse.y6
-rw-r--r--usr.sbin/snmpd/parse.y6
-rw-r--r--usr.sbin/switchd/parse.y6
-rw-r--r--usr.sbin/vmd/parse.y6
-rw-r--r--usr.sbin/ypldap/parse.y6
31 files changed, 92 insertions, 92 deletions
diff --git a/bin/chio/parse.y b/bin/chio/parse.y
index cd3ce1330d1..e735569bce9 100644
--- a/bin/chio/parse.y
+++ b/bin/chio/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.21 2018/07/11 07:39:22 krw Exp $ */
+/* $OpenBSD: parse.y,v 1.22 2019/02/13 22:57:07 deraadt Exp $ */
/*
* Copyright (c) 2006 Bob Beck <beck@openbsd.org>
@@ -329,7 +329,7 @@ yylex(void)
if (c == '-' || isdigit(c)) {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
@@ -368,7 +368,7 @@ nodigits:
if (isalnum(c) || c == ':' || c == '_' || c == '*') {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
diff --git a/sbin/iked/parse.y b/sbin/iked/parse.y
index a786d217074..608d73745cf 100644
--- a/sbin/iked/parse.y
+++ b/sbin/iked/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.77 2018/11/07 08:10:45 miko Exp $ */
+/* $OpenBSD: parse.y,v 1.78 2019/02/13 22:57:07 deraadt Exp $ */
/*
* Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org>
@@ -1418,7 +1418,7 @@ top:
if (c == '-' || isdigit(c)) {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
@@ -1457,7 +1457,7 @@ nodigits:
if (isalnum(c) || c == ':' || c == '_' || c == '*') {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
diff --git a/sbin/ipsecctl/parse.y b/sbin/ipsecctl/parse.y
index 065072215be..dd45841e9b1 100644
--- a/sbin/ipsecctl/parse.y
+++ b/sbin/ipsecctl/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.175 2018/11/07 08:10:45 miko Exp $ */
+/* $OpenBSD: parse.y,v 1.176 2019/02/13 22:57:07 deraadt Exp $ */
/*
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -1215,7 +1215,7 @@ top:
if (c == '-' || isdigit(c)) {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
@@ -1254,7 +1254,7 @@ nodigits:
if (isalnum(c) || c == ':' || c == '_' || c == '*') {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y
index 446f515fe16..e8dd97f6222 100644
--- a/sbin/pfctl/parse.y
+++ b/sbin/pfctl/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.692 2019/02/10 15:05:17 kn Exp $ */
+/* $OpenBSD: parse.y,v 1.693 2019/02/13 22:57:07 deraadt Exp $ */
/*
* Copyright (c) 2001 Markus Friedl. All rights reserved.
@@ -5346,7 +5346,7 @@ top:
if (c == '-' || isdigit(c)) {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
@@ -5385,7 +5385,7 @@ nodigits:
if (isalnum(c) || c == ':' || c == '_') {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
diff --git a/sbin/unwind/uw_parse.y b/sbin/unwind/uw_parse.y
index cd710d0bff0..ce9de6f25ee 100644
--- a/sbin/unwind/uw_parse.y
+++ b/sbin/unwind/uw_parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: uw_parse.y,v 1.9 2019/02/03 12:02:30 florian Exp $ */
+/* $OpenBSD: uw_parse.y,v 1.10 2019/02/13 22:57:07 deraadt Exp $ */
/*
* Copyright (c) 2018 Florian Obser <florian@openbsd.org>
@@ -624,7 +624,7 @@ top:
if (c == '-' || isdigit(c)) {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
@@ -663,7 +663,7 @@ nodigits:
if (isalnum(c) || c == ':' || c == '_') {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
diff --git a/usr.sbin/acme-client/parse.y b/usr.sbin/acme-client/parse.y
index 5f7785bbb32..220269ed279 100644
--- a/usr.sbin/acme-client/parse.y
+++ b/usr.sbin/acme-client/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.32 2019/01/29 16:38:29 benno Exp $ */
+/* $OpenBSD: parse.y,v 1.33 2019/02/13 22:57:08 deraadt Exp $ */
/*
* Copyright (c) 2016 Kristaps Dzonsons <kristaps@bsd.lv>
@@ -646,7 +646,7 @@ top:
if (c == '-' || isdigit(c)) {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return findeol();
}
@@ -685,7 +685,7 @@ nodigits:
if (isalnum(c) || c == ':' || c == '_') {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
diff --git a/usr.sbin/bgpd/parse.y b/usr.sbin/bgpd/parse.y
index 297ab8553cd..53017ea3125 100644
--- a/usr.sbin/bgpd/parse.y
+++ b/usr.sbin/bgpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.371 2019/02/12 09:02:41 claudio Exp $ */
+/* $OpenBSD: parse.y,v 1.372 2019/02/13 22:57:08 deraadt Exp $ */
/*
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -3147,7 +3147,7 @@ top:
if (c == '-' || isdigit(c)) {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
@@ -3186,7 +3186,7 @@ nodigits:
if (isalnum(c) || c == ':' || c == '_' || c == '*') {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
diff --git a/usr.sbin/dvmrpd/parse.y b/usr.sbin/dvmrpd/parse.y
index e3b3af3934d..b08ec559f6c 100644
--- a/usr.sbin/dvmrpd/parse.y
+++ b/usr.sbin/dvmrpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.38 2018/11/01 00:18:44 sashan Exp $ */
+/* $OpenBSD: parse.y,v 1.39 2019/02/13 22:57:08 deraadt Exp $ */
/*
* Copyright (c) 2004, 2005, 2006 Esben Norby <norby@openbsd.org>
@@ -603,7 +603,7 @@ top:
if (c == '-' || isdigit(c)) {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
@@ -642,7 +642,7 @@ nodigits:
if (isalnum(c) || c == ':' || c == '_') {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
diff --git a/usr.sbin/eigrpd/parse.y b/usr.sbin/eigrpd/parse.y
index f358e69b706..f024e3cf0cd 100644
--- a/usr.sbin/eigrpd/parse.y
+++ b/usr.sbin/eigrpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.29 2018/11/01 00:18:44 sashan Exp $ */
+/* $OpenBSD: parse.y,v 1.30 2019/02/13 22:57:08 deraadt Exp $ */
/*
* Copyright (c) 2015 Renato Westphal <renato@openbsd.org>
@@ -852,7 +852,7 @@ top:
if (c == '-' || isdigit(c)) {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
@@ -891,7 +891,7 @@ nodigits:
if (isalnum(c) || c == ':' || c == '_') {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
diff --git a/usr.sbin/hostapd/parse.y b/usr.sbin/hostapd/parse.y
index fcc747bdb84..cc2e91ed893 100644
--- a/usr.sbin/hostapd/parse.y
+++ b/usr.sbin/hostapd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.59 2018/11/01 00:18:44 sashan Exp $ */
+/* $OpenBSD: parse.y,v 1.60 2019/02/13 22:57:08 deraadt Exp $ */
/*
* Copyright (c) 2004, 2005, 2006 Reyk Floeter <reyk@openbsd.org>
@@ -1564,7 +1564,7 @@ top:
if (c == '-' || isdigit(c)) {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
@@ -1603,7 +1603,7 @@ nodigits:
if (isalnum(c) || c == ':' || c == '_' || c == '*') {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
diff --git a/usr.sbin/httpd/parse.y b/usr.sbin/httpd/parse.y
index a68bddc2486..a3662debfcc 100644
--- a/usr.sbin/httpd/parse.y
+++ b/usr.sbin/httpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.108 2019/01/08 18:35:27 florian Exp $ */
+/* $OpenBSD: parse.y,v 1.109 2019/02/13 22:57:08 deraadt Exp $ */
/*
* Copyright (c) 2007 - 2015 Reyk Floeter <reyk@openbsd.org>
@@ -1518,7 +1518,7 @@ top:
if (c == '-' || isdigit(c)) {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
@@ -1557,7 +1557,7 @@ nodigits:
if (isalnum(c) || c == ':' || c == '_' || c == '*') {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
diff --git a/usr.sbin/ifstated/parse.y b/usr.sbin/ifstated/parse.y
index a5a24ce13bc..6ad61baaec0 100644
--- a/usr.sbin/ifstated/parse.y
+++ b/usr.sbin/ifstated/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.54 2018/11/01 00:18:44 sashan Exp $ */
+/* $OpenBSD: parse.y,v 1.55 2019/02/13 22:57:08 deraadt Exp $ */
/*
* Copyright (c) 2004 Ryan McBride <mcbride@openbsd.org>
@@ -597,7 +597,7 @@ top:
if (c == '-' || isdigit(c)) {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
@@ -636,7 +636,7 @@ nodigits:
if (isalnum(c) || c == ':' || c == '_' || c == '&' || c == '|') {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
diff --git a/usr.sbin/iscsictl/parse.y b/usr.sbin/iscsictl/parse.y
index 7f695aa1907..a75ae08ffd8 100644
--- a/usr.sbin/iscsictl/parse.y
+++ b/usr.sbin/iscsictl/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.17 2018/11/01 00:18:44 sashan Exp $ */
+/* $OpenBSD: parse.y,v 1.18 2019/02/13 22:57:08 deraadt Exp $ */
/*
* Copyright (c) 2010 David Gwynne <dlg@openbsd.org>
@@ -587,7 +587,7 @@ top:
if (c == '-' || isdigit(c)) {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
@@ -626,7 +626,7 @@ nodigits:
if (isalnum(c) || c == ':' || c == '_') {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
diff --git a/usr.sbin/ldapd/parse.y b/usr.sbin/ldapd/parse.y
index 4e2766a699d..bad9bc63040 100644
--- a/usr.sbin/ldapd/parse.y
+++ b/usr.sbin/ldapd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.34 2018/11/01 00:18:44 sashan Exp $ */
+/* $OpenBSD: parse.y,v 1.35 2019/02/13 22:57:08 deraadt Exp $ */
/*
* Copyright (c) 2009, 2010 Martin Hedenfalk <martinh@openbsd.org>
@@ -682,7 +682,7 @@ top:
if (c == '-' || isdigit(c)) {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
@@ -721,7 +721,7 @@ nodigits:
if (isalnum(c) || c == ':' || c == '_' || c == '*') {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
diff --git a/usr.sbin/ldapd/schema.c b/usr.sbin/ldapd/schema.c
index 1bf275ffd02..448a5b24521 100644
--- a/usr.sbin/ldapd/schema.c
+++ b/usr.sbin/ldapd/schema.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: schema.c,v 1.17 2017/01/20 11:55:08 benno Exp $ */
+/* $OpenBSD: schema.c,v 1.18 2019/02/13 22:57:08 deraadt Exp $ */
/*
* Copyright (c) 2010 Martin Hedenfalk <martinh@openbsd.org>
@@ -401,7 +401,7 @@ top:
if (isalnum(c) || c == ':' || c == '_' || c == '*') {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
log_warnx("string too long");
return (findeol(schema));
}
diff --git a/usr.sbin/ldomctl/parse.y b/usr.sbin/ldomctl/parse.y
index a20599ec35a..273b0f7d9e0 100644
--- a/usr.sbin/ldomctl/parse.y
+++ b/usr.sbin/ldomctl/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.9 2018/11/01 00:18:44 sashan Exp $ */
+/* $OpenBSD: parse.y,v 1.10 2019/02/13 22:57:08 deraadt Exp $ */
/*
* Copyright (c) 2012 Mark Kettenis <kettenis@openbsd.org>
@@ -431,7 +431,7 @@ yylex(void)
if (c == '-' || isdigit(c)) {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
@@ -470,7 +470,7 @@ nodigits:
if (isalnum(c) || c == ':' || c == '_' || c == '*') {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
diff --git a/usr.sbin/ldpd/parse.y b/usr.sbin/ldpd/parse.y
index 733703a4d99..a20eba16c15 100644
--- a/usr.sbin/ldpd/parse.y
+++ b/usr.sbin/ldpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.70 2019/01/23 08:43:45 dlg Exp $ */
+/* $OpenBSD: parse.y,v 1.71 2019/02/13 22:57:08 deraadt Exp $ */
/*
* Copyright (c) 2013, 2015, 2016 Renato Westphal <renato@openbsd.org>
@@ -1166,7 +1166,7 @@ yylex(void)
if (c == '-' || isdigit(c)) {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
@@ -1205,7 +1205,7 @@ yylex(void)
if (isalnum(c) || c == ':' || c == '_') {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
diff --git a/usr.sbin/lpd/parse.y b/usr.sbin/lpd/parse.y
index 9e9e9103a6e..123a294dda0 100644
--- a/usr.sbin/lpd/parse.y
+++ b/usr.sbin/lpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.5 2018/11/01 00:18:44 sashan Exp $ */
+/* $OpenBSD: parse.y,v 1.6 2019/02/13 22:57:08 deraadt Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
@@ -457,7 +457,7 @@ top:
if (c == '-' || isdigit(c)) {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
@@ -503,7 +503,7 @@ nodigits:
if (isalnum(c) || c == ':' || c == '_') {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
diff --git a/usr.sbin/npppd/npppd/parse.y b/usr.sbin/npppd/npppd/parse.y
index 0433da64017..3c7aaa40220 100644
--- a/usr.sbin/npppd/npppd/parse.y
+++ b/usr.sbin/npppd/npppd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.22 2018/11/01 00:18:44 sashan Exp $ */
+/* $OpenBSD: parse.y,v 1.23 2019/02/13 22:57:08 deraadt Exp $ */
/*
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -1264,7 +1264,7 @@ yylex(void)
if (c == '-' || isdigit(c)) {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
@@ -1303,7 +1303,7 @@ nodigits:
if (isalnum(c) || c == ':' || c == '_' || c == '*') {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
diff --git a/usr.sbin/ntpd/parse.y b/usr.sbin/ntpd/parse.y
index be1a7b53699..6b436d55d46 100644
--- a/usr.sbin/ntpd/parse.y
+++ b/usr.sbin/ntpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.70 2018/11/01 00:18:44 sashan Exp $ */
+/* $OpenBSD: parse.y,v 1.71 2019/02/13 22:57:08 deraadt Exp $ */
/*
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -668,7 +668,7 @@ yylex(void)
if (c == '-' || isdigit(c)) {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
@@ -707,7 +707,7 @@ nodigits:
if (isalnum(c) || c == ':' || c == '_' || c == '*') {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
diff --git a/usr.sbin/ospf6d/parse.y b/usr.sbin/ospf6d/parse.y
index 603c94c2442..093198c2ef0 100644
--- a/usr.sbin/ospf6d/parse.y
+++ b/usr.sbin/ospf6d/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.41 2018/12/29 16:04:31 remi Exp $ */
+/* $OpenBSD: parse.y,v 1.42 2019/02/13 22:57:08 deraadt Exp $ */
/*
* Copyright (c) 2004, 2005 Esben Norby <norby@openbsd.org>
@@ -857,7 +857,7 @@ top:
if (c == '-' || isdigit(c)) {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
@@ -896,7 +896,7 @@ nodigits:
if (isalnum(c) || c == ':' || c == '_') {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
diff --git a/usr.sbin/ospfd/parse.y b/usr.sbin/ospfd/parse.y
index be6aac3dc2a..7e7e1ddf654 100644
--- a/usr.sbin/ospfd/parse.y
+++ b/usr.sbin/ospfd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.94 2018/12/28 19:25:10 remi Exp $ */
+/* $OpenBSD: parse.y,v 1.95 2019/02/13 22:57:08 deraadt Exp $ */
/*
* Copyright (c) 2004, 2005 Esben Norby <norby@openbsd.org>
@@ -1051,7 +1051,7 @@ top:
if (c == '-' || isdigit(c)) {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
@@ -1090,7 +1090,7 @@ nodigits:
if (isalnum(c) || c == ':' || c == '_') {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
diff --git a/usr.sbin/rad/parse.y b/usr.sbin/rad/parse.y
index 01fac688fcb..49f50549f64 100644
--- a/usr.sbin/rad/parse.y
+++ b/usr.sbin/rad/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.11 2018/11/01 00:18:44 sashan Exp $ */
+/* $OpenBSD: parse.y,v 1.12 2019/02/13 22:57:08 deraadt Exp $ */
/*
* Copyright (c) 2018 Florian Obser <florian@openbsd.org>
@@ -659,7 +659,7 @@ top:
if (c == '-' || isdigit(c)) {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
@@ -698,7 +698,7 @@ nodigits:
if (isalnum(c) || c == ':' || c == '_') {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
diff --git a/usr.sbin/radiusd/parse.y b/usr.sbin/radiusd/parse.y
index 4ed94b14dee..c771518a220 100644
--- a/usr.sbin/radiusd/parse.y
+++ b/usr.sbin/radiusd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.7 2018/11/01 00:18:44 sashan Exp $ */
+/* $OpenBSD: parse.y,v 1.8 2019/02/13 22:57:08 deraadt Exp $ */
/*
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -596,7 +596,7 @@ yylex(void)
if (c == '-' || isdigit(c)) {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
@@ -635,7 +635,7 @@ nodigits:
if (isalnum(c) || c == ':' || c == '_' || c == '*') {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
diff --git a/usr.sbin/relayd/parse.y b/usr.sbin/relayd/parse.y
index 42fd6df618c..9875973fd80 100644
--- a/usr.sbin/relayd/parse.y
+++ b/usr.sbin/relayd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.230 2018/11/01 00:18:44 sashan Exp $ */
+/* $OpenBSD: parse.y,v 1.231 2019/02/13 22:57:08 deraadt Exp $ */
/*
* Copyright (c) 2007 - 2014 Reyk Floeter <reyk@openbsd.org>
@@ -2551,7 +2551,7 @@ top:
if (c == '-' || isdigit(c)) {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
@@ -2590,7 +2590,7 @@ nodigits:
if (isalnum(c) || c == ':' || c == '_') {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
diff --git a/usr.sbin/ripd/parse.y b/usr.sbin/ripd/parse.y
index 4f8283f58ae..5968b637c67 100644
--- a/usr.sbin/ripd/parse.y
+++ b/usr.sbin/ripd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.45 2018/12/31 20:34:16 remi Exp $ */
+/* $OpenBSD: parse.y,v 1.46 2019/02/13 22:57:08 deraadt Exp $ */
/*
* Copyright (c) 2006 Michele Marchetto <mydecay@openbeer.it>
@@ -639,7 +639,7 @@ top:
if (c == '-' || isdigit(c)) {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
@@ -678,7 +678,7 @@ nodigits:
if (isalnum(c) || c == ':' || c == '_') {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
diff --git a/usr.sbin/smtpd/parse.y b/usr.sbin/smtpd/parse.y
index 33159dec095..88f2c0b5e62 100644
--- a/usr.sbin/smtpd/parse.y
+++ b/usr.sbin/smtpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.250 2018/12/28 14:21:02 eric Exp $ */
+/* $OpenBSD: parse.y,v 1.251 2019/02/13 22:57:08 deraadt Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
@@ -2545,7 +2545,7 @@ top:
if (c == '-' || isdigit(c)) {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
@@ -2591,7 +2591,7 @@ nodigits:
if (isalnum(c) || c == ':' || c == '_') {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
diff --git a/usr.sbin/snmpd/parse.y b/usr.sbin/snmpd/parse.y
index ee79711bda6..419dea5d443 100644
--- a/usr.sbin/snmpd/parse.y
+++ b/usr.sbin/snmpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.53 2018/11/01 00:18:44 sashan Exp $ */
+/* $OpenBSD: parse.y,v 1.54 2019/02/13 22:57:08 deraadt Exp $ */
/*
* Copyright (c) 2007, 2008, 2012 Reyk Floeter <reyk@openbsd.org>
@@ -868,7 +868,7 @@ top:
if (c == '-' || isdigit(c)) {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
@@ -907,7 +907,7 @@ nodigits:
if (isalnum(c) || c == ':' || c == '_') {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
diff --git a/usr.sbin/switchd/parse.y b/usr.sbin/switchd/parse.y
index 1ef1ff3efce..a1e2c79ba78 100644
--- a/usr.sbin/switchd/parse.y
+++ b/usr.sbin/switchd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.14 2018/11/08 17:48:06 akoshibe Exp $ */
+/* $OpenBSD: parse.y,v 1.15 2019/02/13 22:57:08 deraadt Exp $ */
/*
* Copyright (c) 2007-2016 Reyk Floeter <reyk@openbsd.org>
@@ -511,7 +511,7 @@ top:
if (c == '-' || isdigit(c)) {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
@@ -550,7 +550,7 @@ nodigits:
if (isalnum(c) || c == ':' || c == '_' || c == '/') {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
diff --git a/usr.sbin/vmd/parse.y b/usr.sbin/vmd/parse.y
index 308f9d9d571..fd5902006cc 100644
--- a/usr.sbin/vmd/parse.y
+++ b/usr.sbin/vmd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.49 2018/11/21 12:31:47 reyk Exp $ */
+/* $OpenBSD: parse.y,v 1.50 2019/02/13 22:57:08 deraadt Exp $ */
/*
* Copyright (c) 2007-2016 Reyk Floeter <reyk@openbsd.org>
@@ -1000,7 +1000,7 @@ top:
if (c == '-' || isdigit(c)) {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
@@ -1039,7 +1039,7 @@ nodigits:
if (isalnum(c) || c == ':' || c == '_' || c == '/') {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
diff --git a/usr.sbin/ypldap/parse.y b/usr.sbin/ypldap/parse.y
index 47b8381f449..b5aa523abae 100644
--- a/usr.sbin/ypldap/parse.y
+++ b/usr.sbin/ypldap/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.32 2018/11/29 14:25:07 tedu Exp $ */
+/* $OpenBSD: parse.y,v 1.33 2019/02/13 22:57:08 deraadt Exp $ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -697,7 +697,7 @@ top:
if (c == '-' || isdigit(c)) {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}
@@ -736,7 +736,7 @@ nodigits:
if (isalnum(c) || c == ':' || c == '_') {
do {
*p++ = c;
- if ((unsigned)(p-buf) >= sizeof(buf)) {
+ if ((size_t)(p-buf) >= sizeof(buf)) {
yyerror("string too long");
return (findeol());
}