summaryrefslogtreecommitdiff
path: root/lib/chef/win32
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-02-18 15:59:16 -0800
committerTim Smith <tsmith84@gmail.com>2020-02-18 15:59:16 -0800
commitf64cf7ddf79259a71c5adfdcd1ecba9b85122b01 (patch)
tree6e33ae32feb1e8acec42c8d0f06a1bb85de2233c /lib/chef/win32
parentc9414338729decf217c8bfc37b1d405619c44331 (diff)
downloadchef-f64cf7ddf79259a71c5adfdcd1ecba9b85122b01.tar.gz
Chefstyle fixes identified with Rubocop 0.80
The new Rubocop detects more unnecessary returns. This fixes these ahead of time so we can roll out the new Rubocop engine without breaking builds later. Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib/chef/win32')
-rw-r--r--lib/chef/win32/error.rb2
-rw-r--r--lib/chef/win32/registry.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/win32/error.rb b/lib/chef/win32/error.rb
index aa2ae94273..89cdb11a70 100644
--- a/lib/chef/win32/error.rb
+++ b/lib/chef/win32/error.rb
@@ -50,7 +50,7 @@ class Chef
# Extract the string
begin
- return buffer.read_pointer.read_wstring(num_chars)
+ buffer.read_pointer.read_wstring(num_chars)
ensure
Chef::ReservedNames::Win32::Memory.local_free(buffer.read_pointer)
end
diff --git a/lib/chef/win32/registry.rb b/lib/chef/win32/registry.rb
index 90bc35143a..72be3c8a8d 100644
--- a/lib/chef/win32/registry.rb
+++ b/lib/chef/win32/registry.rb
@@ -154,7 +154,7 @@ class Chef
return true
end
rescue ::Win32::Registry::Error => e
- return false
+ false
end
end