diff options
author | 2007-10-05 15:50:56 +0000 | |
---|---|---|
committer | 2007-10-05 15:50:56 +0000 | |
commit | 2df5977efc96b9740d4f725149ccc3bc866ac08b (patch) | |
tree | 204df8d041b9306713dcba0837f3c8a348ebc7f5 | |
parent | using an enum in the imsg_hdr is gross, use a fixed u_int16_t instead (diff) | |
download | wireguard-openbsd-2df5977efc96b9740d4f725149ccc3bc866ac08b.tar.xz wireguard-openbsd-2df5977efc96b9740d4f725149ccc3bc866ac08b.zip |
cast to an int
-rw-r--r-- | usr.sbin/hoststated/parse.y | 4 | ||||
-rw-r--r-- | usr.sbin/relayd/parse.y | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/hoststated/parse.y b/usr.sbin/hoststated/parse.y index 6135aa6cbce..67411ba6c02 100644 --- a/usr.sbin/hoststated/parse.y +++ b/usr.sbin/hoststated/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.59 2007/10/02 21:04:13 pyr Exp $ */ +/* $OpenBSD: parse.y,v 1.60 2007/10/05 15:50:56 reyk Exp $ */ /* * Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -192,7 +192,7 @@ port : PORT STRING { free($2); } | PORT NUMBER { - if ($2 <= 0 || $2 >= USHRT_MAX) { + if ($2 <= 0 || $2 >= (int)USHRT_MAX) { yyerror("invalid port: %d", $2); YYERROR; } diff --git a/usr.sbin/relayd/parse.y b/usr.sbin/relayd/parse.y index 6135aa6cbce..67411ba6c02 100644 --- a/usr.sbin/relayd/parse.y +++ b/usr.sbin/relayd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.59 2007/10/02 21:04:13 pyr Exp $ */ +/* $OpenBSD: parse.y,v 1.60 2007/10/05 15:50:56 reyk Exp $ */ /* * Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -192,7 +192,7 @@ port : PORT STRING { free($2); } | PORT NUMBER { - if ($2 <= 0 || $2 >= USHRT_MAX) { + if ($2 <= 0 || $2 >= (int)USHRT_MAX) { yyerror("invalid port: %d", $2); YYERROR; } |