From Toralf Förster via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7652
authorEvan Huus <eapache@gmail.com>
Sun, 19 Aug 2012 13:38:53 +0000 (13:38 -0000)
committerEvan Huus <eapache@gmail.com>
Sun, 19 Aug 2012 13:38:53 +0000 (13:38 -0000)
Use a fast bash built-in rather than a slow call out to `expr` to increment
the loop count.

svn path=/trunk/; revision=44580

tools/fuzz-test.sh
tools/randpkt-test.sh

index 8bf888c95867179628357185b2823c3f11979ca5..d89008034047fa083caf2139e23a01fbafe2cac0 100755 (executable)
@@ -213,7 +213,7 @@ function exit_error() {
 # Iterate over our capture files.
 PASS=0
 while [ \( $PASS -lt $MAX_PASSES -o $MAX_PASSES -lt 1 \) -a $DONE -ne 1 ] ; do
-    PASS=`expr $PASS + 1`
+    let PASS=$PASS+1
     echo "Starting pass $PASS:"
     RUN=0
 
index a241c08c3700e16c0bc948c50c07c124d6348970..2c251e6b6665992de8037ea3a2f67f656f9de712 100755 (executable)
@@ -104,7 +104,7 @@ function exit_error() {
 # Iterate over our capture files.
 PASS=0
 while [ $PASS -lt $MAX_PASSES -o $MAX_PASSES -lt 1 ] ; do
-    PASS=`expr $PASS + 1`
+    let PASS=$PASS+1
     echo "Pass $PASS:"
 
     for PKT_TYPE in $PKT_TYPES ; do