Skip to content
This repository has been archived by the owner on Sep 17, 2021. It is now read-only.

Commit

Permalink
remove other unnecessary incorrectly used return statements
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonkhanlar committed Jun 21, 2016
1 parent f32d19b commit 976f226
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions mm-mac2ipv4.tests
Original file line number Diff line number Diff line change
Expand Up @@ -37,27 +37,26 @@ randIPv4octet1() {
randIPv4octet2() {
# Random 96-127
((randdec=$RANDOM / 1024 + 96))
return $randdec
}

randIPv4octet3() {
# Random 0-255
((randdec=$RANDOM / 128))
return $randdec
}

randIPv4octet4() {
# Random 0-255 every other 32
((randdec=$RANDOM / 128))
((randdec=randdec - (randdec % 64 - randdec % 32)))
return $randdec
}

randIPMA() {
local a
randMA=("DC:9F:DB" "DC:9F:DB" "DC:9F:DB" "DC:9F:DB")
randIPv4octet1
echo $randdec
randIPv4octet2
echo $randdec
randMA[0]="${randMA[0]}:$(printf "%02X\n" $((randdec - 64)))"
randMA[1]="${randMA[1]}:$(printf "%02X\n" $randdec)"
randMA[2]="${randMA[2]}:$(printf "%02X\n" $((randdec + 64)))"
Expand Down

0 comments on commit 976f226

Please sign in to comment.