Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net Tweak return value handling
details: https://anonhg.NetBSD.org/src/rev/decb30cc1ccb
branches: trunk
changeset: 342432:decb30cc1ccb
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Tue Dec 22 01:59:21 2015 +0000
description:
Tweak return value handling
rtrequest1 ensures to return an rtentry on success.
diffstat:
sys/net/route.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (30 lines):
diff -r 8af7a2bbfe77 -r decb30cc1ccb sys/net/route.c
--- a/sys/net/route.c Mon Dec 21 20:44:54 2015 +0000
+++ b/sys/net/route.c Tue Dec 22 01:59:21 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: route.c,v 1.152 2015/10/07 09:44:26 roy Exp $ */
+/* $NetBSD: route.c,v 1.153 2015/12/22 01:59:21 ozaki-r Exp $ */
/*-
* Copyright (c) 1998, 2008 The NetBSD Foundation, Inc.
@@ -96,7 +96,7 @@
#endif
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.152 2015/10/07 09:44:26 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.153 2015/12/22 01:59:21 ozaki-r Exp $");
#include <sys/param.h>
#ifdef RTFLUSH_DEBUG
@@ -1060,9 +1060,10 @@
info.rti_info[RTAX_NETMASK] = ifa->ifa_netmask;
error = rtrequest1((cmd == RTM_LLINFO_UPD) ? RTM_GET : cmd, &info,
&nrt);
- if (error != 0 || (rt = nrt) == NULL)
+ if (error != 0)
return error;
+ rt = nrt;
switch (cmd) {
case RTM_DELETE:
rt_newmsg(cmd, rt);
Home |
Main Index |
Thread Index |
Old Index