Source-Changes-HG archive

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

[src/trunk]: src/etc use modulo instead of logical and. from pooka



details:   https://anonhg.NetBSD.org/src/rev/f31b65d4fee4
branches:  trunk
changeset: 755534:f31b65d4fee4
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Jun 08 18:04:17 2010 +0000

description:
use modulo instead of logical and. from pooka

diffstat:

 etc/rc.subr |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r d8ea4fb5b9e7 -r f31b65d4fee4 etc/rc.subr
--- a/etc/rc.subr       Tue Jun 08 17:17:33 2010 +0000
+++ b/etc/rc.subr       Tue Jun 08 18:04:17 2010 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: rc.subr,v 1.84 2010/06/08 13:48:58 christos Exp $
+# $NetBSD: rc.subr,v 1.85 2010/06/08 18:04:17 christos Exp $
 #
 # Copyright (c) 1997-2004 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -1184,7 +1184,7 @@
        if [ "$1" -lt 127 ]
        then
                echo "exited with code $1"
-       elif [ "$(expr $1 & 255)" -eq 127 ]
+       elif [ "$(expr $1 % 256)" -eq 127 ]
        then
                # This cannot really happen because the shell will not
                # pass stopped job status out and the exit code is limited



Home | Main Index | Thread Index | Old Index