Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/netiso deobfuscify PRU_CONNECT a bit - split isop_sfaddr...



details:   https://anonhg.NetBSD.org/src/rev/b6468dfe0c1b
branches:  trunk
changeset: 542820:b6468dfe0c1b
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Sat Feb 08 11:11:11 2003 +0000

description:
deobfuscify PRU_CONNECT a bit - split isop_sfaddr and rcb_faddr pointer
assignment to separate statements (and lines), add some comments

diffstat:

 sys/netiso/clnp_raw.c |  14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diffs (39 lines):

diff -r e03b9ce3256e -r b6468dfe0c1b sys/netiso/clnp_raw.c
--- a/sys/netiso/clnp_raw.c     Sat Feb 08 10:00:33 2003 +0000
+++ b/sys/netiso/clnp_raw.c     Sat Feb 08 11:11:11 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: clnp_raw.c,v 1.15 2001/11/13 01:10:47 lukem Exp $      */
+/*     $NetBSD: clnp_raw.c,v 1.16 2003/02/08 11:11:11 jdolecek Exp $   */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -63,7 +63,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: clnp_raw.c,v 1.15 2001/11/13 01:10:47 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: clnp_raw.c,v 1.16 2003/02/08 11:11:11 jdolecek Exp $");
 
 #include <sys/param.h>
 #include <sys/mbuf.h>
@@ -370,11 +370,19 @@
                                return (EINVAL);
                        if (ifnet.tqh_first == 0)
                                return (EADDRNOTAVAIL);
+
+                       /* copy the address */
                        if (addr->siso_family != AF_ISO)
                                rp->risop_isop.isop_sfaddr = *addr;
+
+                       /* initialize address pointers */
+                       rp->risop_isop.isop_faddr = &rp->risop_isop.isop_sfaddr;
                        rp->risop_rcb.rcb_faddr = sisotosa(
-                                                          (rp->risop_isop.isop_faddr = &rp->risop_isop.isop_sfaddr));
+                               rp->risop_isop.isop_faddr);
+
+                       /* address setup, mark socket connected */
                        soisconnected(so);
+
                        return (0);
                }
        }



Home | Main Index | Thread Index | Old Index