diff options
author | rwatson <rwatson@FreeBSD.org> | 2006-03-25 18:54:17 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2006-03-25 18:54:17 +0000 |
commit | d1671df33912c22dacd12483ab4fae8bdd91e78f (patch) | |
tree | 874a7b1842b5fe035f4641b6e6a106a7233caef4 /sys/netatalk | |
parent | 851b87ce3b8a9c281d79bfc15e6a6011bdaa6ee3 (diff) | |
download | FreeBSD-src-d1671df33912c22dacd12483ab4fae8bdd91e78f.zip FreeBSD-src-d1671df33912c22dacd12483ab4fae8bdd91e78f.tar.gz |
In at_setsockaddr(), assert that ddp != NULL, rather than returning an
error if it's NULL, as so_pcb != NULL is now an invariant.
Diffstat (limited to 'sys/netatalk')
-rw-r--r-- | sys/netatalk/ddp_usrreq.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/netatalk/ddp_usrreq.c b/sys/netatalk/ddp_usrreq.c index df04cab..c722aea 100644 --- a/sys/netatalk/ddp_usrreq.c +++ b/sys/netatalk/ddp_usrreq.c @@ -255,9 +255,8 @@ at_setsockaddr(struct socket *so, struct sockaddr **nam) struct ddpcb *ddp; ddp = sotoddpcb(so); - if (ddp == NULL) { - return (EINVAL); - } + KASSERT(ddp != NULL, ("at_setsockaddr: ddp == NULL")); + DDP_LOCK(ddp); at_sockaddr(ddp, nam); DDP_UNLOCK(ddp); |