Avoid unnecessary calls to expr(1) by using standard shell arithmetic
expansion instead.
This commit is contained in:
+1
-1
@@ -218,7 +218,7 @@ network_pass1() {
|
||||
if [ -n "${ifconfig_args}" ]; then
|
||||
ifconfig ${ifn} ${ifconfig_args} alias
|
||||
eval showstat_$ifn=1
|
||||
alias=`expr ${alias} + 1`
|
||||
alias=$((${alias} + 1))
|
||||
else
|
||||
break;
|
||||
fi
|
||||
|
||||
+1
-1
@@ -148,7 +148,7 @@ atm_pass2() {
|
||||
netindx=0
|
||||
while [ ${netindx} -lt ${netcnt} ]; do
|
||||
net="${netname}${netindx}"
|
||||
netindx=`expr ${netindx} + 1`
|
||||
netindx=$((${netindx} + 1))
|
||||
echo -n " ${net}"
|
||||
|
||||
# Configure atmarp server
|
||||
|
||||
+1
-1
@@ -148,7 +148,7 @@ atm_pass2() {
|
||||
netindx=0
|
||||
while [ ${netindx} -lt ${netcnt} ]; do
|
||||
net="${netname}${netindx}"
|
||||
netindx=`expr ${netindx} + 1`
|
||||
netindx=$((${netindx} + 1))
|
||||
echo -n " ${net}"
|
||||
|
||||
# Configure atmarp server
|
||||
|
||||
+1
-1
@@ -148,7 +148,7 @@ atm_pass2() {
|
||||
netindx=0
|
||||
while [ ${netindx} -lt ${netcnt} ]; do
|
||||
net="${netname}${netindx}"
|
||||
netindx=`expr ${netindx} + 1`
|
||||
netindx=$((${netindx} + 1))
|
||||
echo -n " ${net}"
|
||||
|
||||
# Configure atmarp server
|
||||
|
||||
+1
-1
@@ -148,7 +148,7 @@ atm_pass2() {
|
||||
netindx=0
|
||||
while [ ${netindx} -lt ${netcnt} ]; do
|
||||
net="${netname}${netindx}"
|
||||
netindx=`expr ${netindx} + 1`
|
||||
netindx=$((${netindx} + 1))
|
||||
echo -n " ${net}"
|
||||
|
||||
# Configure atmarp server
|
||||
|
||||
+1
-1
@@ -148,7 +148,7 @@ atm_pass2() {
|
||||
netindx=0
|
||||
while [ ${netindx} -lt ${netcnt} ]; do
|
||||
net="${netname}${netindx}"
|
||||
netindx=`expr ${netindx} + 1`
|
||||
netindx=$((${netindx} + 1))
|
||||
echo -n " ${net}"
|
||||
|
||||
# Configure atmarp server
|
||||
|
||||
+1
-1
@@ -148,7 +148,7 @@ atm_pass2() {
|
||||
netindx=0
|
||||
while [ ${netindx} -lt ${netcnt} ]; do
|
||||
net="${netname}${netindx}"
|
||||
netindx=`expr ${netindx} + 1`
|
||||
netindx=$((${netindx} + 1))
|
||||
echo -n " ${net}"
|
||||
|
||||
# Configure atmarp server
|
||||
|
||||
+1
-1
@@ -218,7 +218,7 @@ network_pass1() {
|
||||
if [ -n "${ifconfig_args}" ]; then
|
||||
ifconfig ${ifn} ${ifconfig_args} alias
|
||||
eval showstat_$ifn=1
|
||||
alias=`expr ${alias} + 1`
|
||||
alias=$((${alias} + 1))
|
||||
else
|
||||
break;
|
||||
fi
|
||||
|
||||
+1
-1
@@ -218,7 +218,7 @@ network_pass1() {
|
||||
if [ -n "${ifconfig_args}" ]; then
|
||||
ifconfig ${ifn} ${ifconfig_args} alias
|
||||
eval showstat_$ifn=1
|
||||
alias=`expr ${alias} + 1`
|
||||
alias=$((${alias} + 1))
|
||||
else
|
||||
break;
|
||||
fi
|
||||
|
||||
+1
-1
@@ -218,7 +218,7 @@ network_pass1() {
|
||||
if [ -n "${ifconfig_args}" ]; then
|
||||
ifconfig ${ifn} ${ifconfig_args} alias
|
||||
eval showstat_$ifn=1
|
||||
alias=`expr ${alias} + 1`
|
||||
alias=$((${alias} + 1))
|
||||
else
|
||||
break;
|
||||
fi
|
||||
|
||||
+1
-1
@@ -218,7 +218,7 @@ network_pass1() {
|
||||
if [ -n "${ifconfig_args}" ]; then
|
||||
ifconfig ${ifn} ${ifconfig_args} alias
|
||||
eval showstat_$ifn=1
|
||||
alias=`expr ${alias} + 1`
|
||||
alias=$((${alias} + 1))
|
||||
else
|
||||
break;
|
||||
fi
|
||||
|
||||
+1
-1
@@ -218,7 +218,7 @@ network_pass1() {
|
||||
if [ -n "${ifconfig_args}" ]; then
|
||||
ifconfig ${ifn} ${ifconfig_args} alias
|
||||
eval showstat_$ifn=1
|
||||
alias=`expr ${alias} + 1`
|
||||
alias=$((${alias} + 1))
|
||||
else
|
||||
break;
|
||||
fi
|
||||
|
||||
+1
-1
@@ -218,7 +218,7 @@ network_pass1() {
|
||||
if [ -n "${ifconfig_args}" ]; then
|
||||
ifconfig ${ifn} ${ifconfig_args} alias
|
||||
eval showstat_$ifn=1
|
||||
alias=`expr ${alias} + 1`
|
||||
alias=$((${alias} + 1))
|
||||
else
|
||||
break;
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user