Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net 'newrt' is not supposed to be NULL. Therefore, the N...
details: https://anonhg.NetBSD.org/src/rev/0e112e7f4018
branches: trunk
changeset: 327950:0e112e7f4018
user: maxv <maxv%NetBSD.org@localhost>
date: Sat Mar 22 07:46:35 2014 +0000
description:
'newrt' is not supposed to be NULL. Therefore, the NULL-check in the if()
is pointless; and even if 'newrt' were NULL, 'rt' would be dereferenced
later. This is not a bug.
CID 270855
ok christos@
diffstat:
sys/net/route.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r b47f881598c9 -r 0e112e7f4018 sys/net/route.c
--- a/sys/net/route.c Sat Mar 22 07:27:21 2014 +0000
+++ b/sys/net/route.c Sat Mar 22 07:46:35 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: route.c,v 1.128 2014/02/25 18:30:12 pooka Exp $ */
+/* $NetBSD: route.c,v 1.129 2014/03/22 07:46:35 maxv Exp $ */
/*-
* Copyright (c) 1998, 2008 The NetBSD Foundation, Inc.
@@ -93,7 +93,7 @@
#include "opt_route.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.128 2014/02/25 18:30:12 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.129 2014/03/22 07:46:35 maxv Exp $");
#include <sys/param.h>
#include <sys/kmem.h>
@@ -341,7 +341,8 @@
goto miss;
}
KASSERT(newrt != NULL);
- if ((rt = newrt) && (rt->rt_flags & RTF_XRESOLVE)) {
+ rt = newrt;
+ if (rt->rt_flags & RTF_XRESOLVE) {
msgtype = RTM_RESOLVE;
goto miss;
}
Home |
Main Index |
Thread Index |
Old Index