Skip to content

Commit

Permalink
burn: Minor code optimization.
Browse files Browse the repository at this point in the history
  • Loading branch information
Explorer09 committed Sep 18, 2014
1 parent 88a79c9 commit bf4452d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .git_cache_meta
@@ -1,5 +1,5 @@
chmod 0644 .git_cache_meta
touch -c -h -d "2014-09-18 20:52:10.5270733180 +0800" .git_cache_meta
touch -c -h -d "2014-09-18 20:56:54.1464897220 +0800" .git_cache_meta
chmod 0644 .gitattributes
touch -c -h -d "2014-08-20 00:54:12.8755119350 +0800" .gitattributes
chmod 0644 .gitignore
Expand Down Expand Up @@ -127,7 +127,7 @@ touch -c -h -d "2014-06-24 11:44:51.7239778750 +0800" cpustress/build/build-init
touch -c -h -d "2014-06-24 11:44:51.7279778250 +0800" cpustress/build/build-initrd/usr/bin/uptime
touch -c -h -d "2014-06-24 11:44:51.7319777750 +0800" cpustress/build/build-initrd/usr/bin/which
chmod 0755 cpustress/build/build-initrd/usr/local/bin/burn
touch -c -h -d "2014-08-01 13:28:30.6020859280 +0800" cpustress/build/build-initrd/usr/local/bin/burn
touch -c -h -d "2014-09-18 20:56:48.6584261460 +0800" cpustress/build/build-initrd/usr/local/bin/burn
touch -c -h -d "2013-04-16 21:23:38.1153474510 +0800" cpustress/build/build-initrd/usr/local/bin/cpuburn-in
chmod 0755 cpustress/build/build-initrd/usr/local/bin/cpuburn-m
touch -c -h -d "2014-08-01 13:22:49.2700564120 +0800" cpustress/build/build-initrd/usr/local/bin/cpuburn-m
Expand Down
13 changes: 5 additions & 8 deletions cpustress/build/build-initrd/usr/local/bin/burn
Expand Up @@ -17,7 +17,7 @@
# <https://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
#
# Written by Explorer.
# Last updated on 1 August 2014.
# Last updated on 18 September 2014.


set -m
Expand All @@ -33,7 +33,7 @@ sigchld_handler () {
CHLD_COUNT=$(($CHLD_COUNT+1))
if [ "$CHLD_COUNT" -ge "$instances" ]; then
trap - 1 2 3 15
exit 0;
exit 0
fi
trap 'sigchld_handler' 17
read -s -n1 REPLY
Expand Down Expand Up @@ -123,8 +123,7 @@ HELP
MODE="$1"
;;
MMX | BX)
MODE="$1"
RAMSIZE="$2"
MODE="$1" RAMSIZE="$2"
;;
*)
ASK_RAMSIZE=Y
Expand Down Expand Up @@ -170,11 +169,9 @@ fi
ARGS=""
while :; do
if [ "$MODE" = MMX ]; then
DEFAULT_SIZE=64kB
ARGS=" F"
DEFAULT_SIZE=64kB ARGS=" F"
elif [ "$MODE" = BX ]; then
DEFAULT_SIZE=4MB
ARGS=" L"
DEFAULT_SIZE=4MB ARGS=" L"
else
break
fi
Expand Down

0 comments on commit bf4452d

Please sign in to comment.