Avoid verbosity overflow/underflow

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2010-03-22 15:41:32 -07:00
parent 5ad0088ce7
commit ef4237f5a0
2 changed files with 4 additions and 4 deletions

View File

@ -71,11 +71,11 @@ while [ $finished -eq 0 -a $# -gt 0 ]; do
while [ -n "$option" ]; do
case $option in
v*)
VERBOSITY=$(($VERBOSITY + 1 ))
[ $VERBOSITY -lt 2 ] && VERBOSITY=$(($VERBOSITY + 1 ))
option=${option#v}
;;
q*)
VERBOSITY=$(($VERBOSITY - 1 ))
[ $VERBOSITY -gt -1 ] && VERBOSITY=$(($VERBOSITY - 1 ))
option=${option#q}
;;
n*)

View File

@ -71,11 +71,11 @@ while [ $finished -eq 0 -a $# -gt 0 ]; do
while [ -n "$option" ]; do
case $option in
v*)
VERBOSITY=$(($VERBOSITY + 1 ))
[ $VERBOSITY -lt 2 ] && VERBOSITY=$(($VERBOSITY + 1 ))
option=${option#v}
;;
q*)
VERBOSITY=$(($VERBOSITY - 1 ))
[ $VERBOSITY -gt -1 ] && VERBOSITY=$(($VERBOSITY - 1 ))
option=${option#q}
;;
n*)