Source-Changes-HG archive

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

[src/trunk]: src/sys/kern simplify expression



details:   https://anonhg.NetBSD.org/src/rev/9e6d662d1fd8
branches:  trunk
changeset: 772168:9e6d662d1fd8
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Dec 21 15:26:57 2011 +0000

description:
simplify expression

diffstat:

 sys/kern/uipc_syscalls.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 179615192975 -r 9e6d662d1fd8 sys/kern/uipc_syscalls.c
--- a/sys/kern/uipc_syscalls.c  Wed Dec 21 14:33:13 2011 +0000
+++ b/sys/kern/uipc_syscalls.c  Wed Dec 21 15:26:57 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uipc_syscalls.c,v 1.149 2011/12/20 23:56:28 christos Exp $     */
+/*     $NetBSD: uipc_syscalls.c,v 1.150 2011/12/21 15:26:57 christos Exp $     */
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls.c,v 1.149 2011/12/20 23:56:28 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_syscalls.c,v 1.150 2011/12/21 15:26:57 christos Exp $");
 
 #include "opt_pipe.h"
 
@@ -367,7 +367,8 @@
        error = soconnect(so, nam, l);
        if (error)
                goto bad;
-       if ((so->so_state & SS_NBIO) && (so->so_state & SS_ISCONNECTING) != 0) {
+       if ((so->so_state & (SS_NBIO|SS_ISCONNECTING)) ==
+           (SS_NBIO|SS_ISCONNECTING)) {
                error = EINPROGRESS;
                goto out;
        }



Home | Main Index | Thread Index | Old Index