Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern remove unnecessary check that nam != NULL before de...
details: https://anonhg.NetBSD.org/src/rev/810b6d10d64b
branches: trunk
changeset: 337897:810b6d10d64b
user: rtr <rtr%NetBSD.org@localhost>
date: Sat May 02 21:15:33 2015 +0000
description:
remove unnecessary check that nam != NULL before deref in soconnect()
(added in previous commit).
sockargs copyin() makes sure we don't get NULL here
diffstat:
sys/kern/uipc_socket.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diffs (28 lines):
diff -r 1a9eafa64be8 -r 810b6d10d64b sys/kern/uipc_socket.c
--- a/sys/kern/uipc_socket.c Sat May 02 20:22:12 2015 +0000
+++ b/sys/kern/uipc_socket.c Sat May 02 21:15:33 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uipc_socket.c,v 1.241 2015/05/02 20:10:26 rtr Exp $ */
+/* $NetBSD: uipc_socket.c,v 1.242 2015/05/02 21:15:33 rtr Exp $ */
/*-
* Copyright (c) 2002, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.241 2015/05/02 20:10:26 rtr Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.242 2015/05/02 21:15:33 rtr Exp $");
#include "opt_compat_netbsd.h"
#include "opt_sock_counters.h"
@@ -830,8 +830,7 @@
(error = sodisconnect(so)))) {
error = EISCONN;
} else {
- if (NULL != nam &&
- nam->sa_family != so->so_proto->pr_domain->dom_family) {
+ if (nam->sa_family != so->so_proto->pr_domain->dom_family) {
return EAFNOSUPPORT;
}
error = (*so->so_proto->pr_usrreqs->pr_connect)(so, nam, l);
Home |
Main Index |
Thread Index |
Old Index