Source-Changes-HG archive

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

[src/trunk]: src/sys/kern Revert to revision 1.249 to undo changes from PR 49...



details:   https://anonhg.NetBSD.org/src/rev/fce07151841e
branches:  trunk
changeset: 348291:fce07151841e
user:      uwe <uwe%NetBSD.org@localhost>
date:      Thu Oct 13 19:10:23 2016 +0000

description:
Revert to revision 1.249 to undo changes from PR 49636.

Marking up some zeroes with a type suffix, while not marking others in
the very same function does nothing but places cognitive burden on the
reader.

Spelling "clear bits" as "&~" is actually not uncommon (and some say
is more readable).

diffstat:

 sys/kern/uipc_socket.c |  14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diffs (61 lines):

diff -r b8736dfc2328 -r fce07151841e sys/kern/uipc_socket.c
--- a/sys/kern/uipc_socket.c    Thu Oct 13 18:58:00 2016 +0000
+++ b/sys/kern/uipc_socket.c    Thu Oct 13 19:10:23 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uipc_socket.c,v 1.251 2016/10/10 01:22:51 dholland Exp $       */
+/*     $NetBSD: uipc_socket.c,v 1.252 2016/10/13 19:10:23 uwe 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.251 2016/10/10 01:22:51 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.252 2016/10/13 19:10:23 uwe Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -346,7 +346,7 @@
        int i;
 
        if (VMSPACE_IS_KERNEL_P(uio->uio_vmspace))
-               return 0L;
+               return (0);
 
        if (iov->iov_len < (size_t) space)
                space = iov->iov_len;
@@ -362,13 +362,13 @@
 
        lva = sokvaalloc(sva, len, so);
        if (lva == 0)
-               return 0L;
+               return 0;
 
        error = uvm_loan(&uio->uio_vmspace->vm_map, sva, len,
            m->m_ext.ext_pgs, UVM_LOAN_TOPAGE);
        if (error) {
                sokvafree(lva, len);
-               return 0L;
+               return (0);
        }
 
        for (i = 0, va = lva; i < npgs; i++, va += PAGE_SIZE)
@@ -1008,7 +1008,7 @@
                                    uio->uio_iov->iov_len >= sock_loan_thresh &&
                                    space >= sock_loan_thresh &&
                                    (len = sosend_loan(so, uio, m,
-                                                      space)) != 0L) {
+                                                      space)) != 0) {
                                        SOSEND_COUNTER_INCR(&sosend_loan_big);
                                        space -= len;
                                        goto have_data;
@@ -1175,7 +1175,7 @@
        if (controlp != NULL)
                *controlp = NULL;
        if (flagsp != NULL)
-               flags = *flagsp & ~MSG_EOR;
+               flags = *flagsp &~ MSG_EOR;
        else
                flags = 0;
 



Home | Main Index | Thread Index | Old Index