Skip to content

Commit

Permalink
remove redundant return
Browse files Browse the repository at this point in the history
  • Loading branch information
jreidinger committed Nov 26, 2014
1 parent 4b11643 commit a82c945
Show file tree
Hide file tree
Showing 12 changed files with 14 additions and 20 deletions.
6 changes: 0 additions & 6 deletions .rubocop.yml
Expand Up @@ -153,12 +153,6 @@ Style/NegatedIf:
Style/NumericLiterals:
MinDigits: 4

# Offense count: 14
# Cop supports --auto-correct.
# Configuration parameters: AllowMultipleReturnValues.
Style/RedundantReturn:
Enabled: false

# Offense count: 14
Style/RegexpLiteral:
MaxSlashes: 5
Expand Down
2 changes: 1 addition & 1 deletion src/clients/bootloader.rb
Expand Up @@ -138,7 +138,7 @@ def BootloaderSummaryHandler(_options)
# @return [Boolean] true on success
def BootloaderModify(key, value)
BootCommon.globals[key] = value
return true
true
end

# Set specified option in global options
Expand Down
2 changes: 1 addition & 1 deletion src/include/bootloader/routines/lib_iface.rb
Expand Up @@ -351,7 +351,7 @@ def InitializeBootloader

# perl have slightly different evaluation of boolean, so lets convert it
ret = ![false, nil, 0, ""].include?(ret)
return ret
ret
end

# Get contents of files from the library cache
Expand Down
2 changes: 1 addition & 1 deletion src/lib/bootloader/disk_change_detector.rb
Expand Up @@ -92,7 +92,7 @@ def invalid_custom?

all_boot_partitions = Yast::BootStorage.possible_locations_for_stage1

return !all_boot_partitions.include?(boot_custom)
!all_boot_partitions.include?(boot_custom)
end
end
end
2 changes: 1 addition & 1 deletion src/lib/bootloader/grub2pwd.rb
Expand Up @@ -58,6 +58,6 @@ def encrypt(password)
raise "INTERNAL ERROR: output do not contain encrypted password. Output: #{result["stdout"]}"
end

return ret
ret
end
end
4 changes: 2 additions & 2 deletions src/lib/bootloader/mbr_update.rb
Expand Up @@ -88,7 +88,7 @@ def install_generic_mbr
log.info "Command `#{command}` output: #{out}"
ret &&= out["exit"] == 0
end
return ret
ret
end

def set_parted_flag(disk, part_num, flag)
Expand Down Expand Up @@ -134,7 +134,7 @@ def boot_devices
@boot_devices << boot_device if boot_device.start_with?("/dev/md")
end

return @boot_devices
@boot_devices
end

# get a list of all bootloader devices or their underlying soft-RAID
Expand Down
4 changes: 2 additions & 2 deletions src/lib/bootloader/udev_mapping.rb
Expand Up @@ -81,7 +81,7 @@ def to_mountby_device(dev)
end

# udev pair contain as first udev device and as second coresponding kernel device
return udev_pair.first
udev_pair.first
end

private
Expand Down Expand Up @@ -180,7 +180,7 @@ def cache_valid?
return false unless uuid_may_appear?
end

return @target_map_timestamp == Yast::Storage.GetTargetChangeTime
@target_map_timestamp == Yast::Storage.GetTargetChangeTime
end

def uuid_may_appear?
Expand Down
2 changes: 1 addition & 1 deletion src/modules/BootCommon.rb
Expand Up @@ -517,7 +517,7 @@ def VerifyMDArray
return true
end
end
return false
false
end

# FIXME: just backward compatible interface, call directly BootStorage
Expand Down
4 changes: 2 additions & 2 deletions src/modules/BootGRUB2.rb
Expand Up @@ -238,7 +238,7 @@ def urlLocationSummary
line << "</ul>"

# TRANSLATORS: title for list of location proposals
return _("Change Location: %s") % line
_("Change Location: %s") % line
end

# Display bootloader summary
Expand Down Expand Up @@ -289,7 +289,7 @@ def Summary
order_sum = BootCommon.DiskOrderSummary
result << order_sum if order_sum

return result
result
end

def Dialogs
Expand Down
2 changes: 1 addition & 1 deletion src/modules/BootStorage.rb
Expand Up @@ -325,7 +325,7 @@ def can_boot_from_partition
log.info "FS for boot partition #{fs}"

# cannot install stage one to xfs as it doesn't have reserved space (bnc#884255)
return fs != :xfs
fs != :xfs
end

# FATE#305008: Failover boot configurations for md arrays with redundancy
Expand Down
2 changes: 1 addition & 1 deletion src/modules/BootSupportCheck.rb
Expand Up @@ -136,7 +136,7 @@ def check_gpt_reserved_partition
"Boot from MBR does not work together with btrfs filesystem and GPT disk label without bios_grub partition." \
"To fix this issue, create bios_grub partition or use any ext filesystem for boot partition or do not install stage 1 to MBR."
))
return false
false
end

# Check if boot partition exist
Expand Down
2 changes: 1 addition & 1 deletion src/modules/Bootloader.rb
Expand Up @@ -450,7 +450,7 @@ def kernel_param(flavor, key)

# map old api response to new one
api_mapping = { "true" => :present, "false" => :missing }
return api_mapping[ret] || ret
api_mapping[ret] || ret
end

# Modify kernel parameters for installed kernels according to values
Expand Down

0 comments on commit a82c945

Please sign in to comment.