Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Remove unnecessary casts and do s/0/NULL/ for rtrequest
details: https://anonhg.NetBSD.org/src/rev/175ed17f578d
branches: trunk
changeset: 344488:175ed17f578d
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Fri Apr 01 09:16:02 2016 +0000
description:
Remove unnecessary casts and do s/0/NULL/ for rtrequest
diffstat:
sys/netinet/ip_icmp.c | 15 +++++++--------
sys/netinet6/icmp6.c | 11 +++++------
2 files changed, 12 insertions(+), 14 deletions(-)
diffs (96 lines):
diff -r ba1fdf30a738 -r 175ed17f578d sys/netinet/ip_icmp.c
--- a/sys/netinet/ip_icmp.c Fri Apr 01 09:00:27 2016 +0000
+++ b/sys/netinet/ip_icmp.c Fri Apr 01 09:16:02 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip_icmp.c,v 1.144 2016/01/21 15:41:30 riastradh Exp $ */
+/* $NetBSD: ip_icmp.c,v 1.145 2016/04/01 09:16:02 ozaki-r Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -94,7 +94,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_icmp.c,v 1.144 2016/01/21 15:41:30 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_icmp.c,v 1.145 2016/04/01 09:16:02 ozaki-r Exp $");
#ifdef _KERNEL_OPT
#include "opt_ipsec.h"
@@ -1106,8 +1106,7 @@
if ((rt->rt_flags & RTF_HOST) == 0) {
struct rtentry *nrt;
- error = rtrequest((int) RTM_ADD, dst,
- (struct sockaddr *) rt->rt_gateway, NULL,
+ error = rtrequest(RTM_ADD, dst, rt->rt_gateway, NULL,
RTF_GATEWAY | RTF_HOST | RTF_DYNAMIC, &nrt);
if (error) {
rtfree(rt);
@@ -1220,8 +1219,8 @@
if ((rt->rt_flags & (RTF_DYNAMIC | RTF_HOST)) ==
(RTF_DYNAMIC | RTF_HOST)) {
- rtrequest((int) RTM_DELETE, rt_getkey(rt),
- rt->rt_gateway, rt_mask(rt), rt->rt_flags, 0);
+ rtrequest(RTM_DELETE, rt_getkey(rt),
+ rt->rt_gateway, rt_mask(rt), rt->rt_flags, NULL);
} else {
if ((rt->rt_rmx.rmx_locks & RTV_MTU) == 0) {
rt->rt_rmx.rmx_mtu = 0;
@@ -1238,8 +1237,8 @@
if ((rt->rt_flags & (RTF_DYNAMIC | RTF_HOST)) ==
(RTF_DYNAMIC | RTF_HOST)) {
- rtrequest((int) RTM_DELETE, rt_getkey(rt),
- rt->rt_gateway, rt_mask(rt), rt->rt_flags, 0);
+ rtrequest(RTM_DELETE, rt_getkey(rt),
+ rt->rt_gateway, rt_mask(rt), rt->rt_flags, NULL);
}
}
diff -r ba1fdf30a738 -r 175ed17f578d sys/netinet6/icmp6.c
--- a/sys/netinet6/icmp6.c Fri Apr 01 09:00:27 2016 +0000
+++ b/sys/netinet6/icmp6.c Fri Apr 01 09:16:02 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: icmp6.c,v 1.180 2016/04/01 08:12:00 ozaki-r Exp $ */
+/* $NetBSD: icmp6.c,v 1.181 2016/04/01 09:16:02 ozaki-r Exp $ */
/* $KAME: icmp6.c,v 1.217 2001/06/20 15:03:29 jinmei Exp $ */
/*
@@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: icmp6.c,v 1.180 2016/04/01 08:12:00 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: icmp6.c,v 1.181 2016/04/01 09:16:02 ozaki-r Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -2682,8 +2682,7 @@
if ((rt->rt_flags & RTF_HOST) == 0) {
struct rtentry *nrt;
- error = rtrequest((int) RTM_ADD, dst,
- (struct sockaddr *) rt->rt_gateway, NULL,
+ error = rtrequest(RTM_ADD, dst, rt->rt_gateway, NULL,
RTF_GATEWAY | RTF_HOST | RTF_DYNAMIC, &nrt);
if (error) {
rtfree(rt);
@@ -2712,7 +2711,7 @@
if ((rt->rt_flags & (RTF_DYNAMIC | RTF_HOST)) ==
(RTF_DYNAMIC | RTF_HOST)) {
- rtrequest((int) RTM_DELETE, rt_getkey(rt),
+ rtrequest(RTM_DELETE, rt_getkey(rt),
rt->rt_gateway, rt_mask(rt), rt->rt_flags, NULL);
} else {
if (!(rt->rt_rmx.rmx_locks & RTV_MTU))
@@ -2729,7 +2728,7 @@
if ((rt->rt_flags & (RTF_GATEWAY | RTF_DYNAMIC | RTF_HOST)) ==
(RTF_GATEWAY | RTF_DYNAMIC | RTF_HOST)) {
- rtrequest((int) RTM_DELETE, rt_getkey(rt),
+ rtrequest(RTM_DELETE, rt_getkey(rt),
rt->rt_gateway, rt_mask(rt), rt->rt_flags, NULL);
}
}
Home |
Main Index |
Thread Index |
Old Index