Module Name: src
Committed By: kamil
Date: Sat Feb 22 00:42:15 UTC 2020
Modified Files:
src/sbin/route: route.c
Log Message:
Avoid undefined behavior
route.c:1523:20, left shift of 1073741824 by 1 places cannot be represented
in type 'int'
To generate a diff of this commit:
cvs rdiff -u -r1.165 -r1.166 src/sbin/route/route.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sbin/route/route.c
diff -u src/sbin/route/route.c:1.165 src/sbin/route/route.c:1.166
--- src/sbin/route/route.c:1.165 Wed Jan 22 19:22:06 2020
+++ src/sbin/route/route.c Sat Feb 22 00:42:15 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: route.c,v 1.165 2020/01/22 19:22:06 roy Exp $ */
+/* $NetBSD: route.c,v 1.166 2020/02/22 00:42:15 kamil Exp $ */
/*
* Copyright (c) 1983, 1989, 1991, 1993
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 19
#if 0
static char sccsid[] = "@(#)route.c 8.6 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: route.c,v 1.165 2020/01/22 19:22:06 roy Exp $");
+__RCSID("$NetBSD: route.c,v 1.166 2020/02/22 00:42:15 kamil Exp $");
#endif
#endif /* not lint */
@@ -1498,7 +1498,7 @@ print_getmsg(struct rt_msghdr *rtm, int
struct sockaddr_dl *ifp = NULL;
struct sockaddr *sa;
char *cp;
- int i;
+ unsigned int i;
if (! shortoutput) {
(void)printf(" route to: %s\n",