summaryrefslogtreecommitdiff
path: root/lib/chef/mixin
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/mixin')
-rw-r--r--lib/chef/mixin/command/unix.rb2
-rw-r--r--lib/chef/mixin/windows_architecture_helper.rb4
-rw-r--r--lib/chef/mixin/windows_env_helper.rb6
3 files changed, 6 insertions, 6 deletions
diff --git a/lib/chef/mixin/command/unix.rb b/lib/chef/mixin/command/unix.rb
index d930ee33e6..bfd507979f 100644
--- a/lib/chef/mixin/command/unix.rb
+++ b/lib/chef/mixin/command/unix.rb
@@ -109,7 +109,7 @@ class Chef
Marshal.dump(e, ps.last)
ps.last.flush
end
- ps.last.close unless (ps.last.closed?)
+ ps.last.close unless ps.last.closed?
exit!
}
ensure
diff --git a/lib/chef/mixin/windows_architecture_helper.rb b/lib/chef/mixin/windows_architecture_helper.rb
index 5f8d3e3729..ea058537ea 100644
--- a/lib/chef/mixin/windows_architecture_helper.rb
+++ b/lib/chef/mixin/windows_architecture_helper.rb
@@ -98,13 +98,13 @@ class Chef
end
def disable_wow64_file_redirection( node )
- if ( ( node_windows_architecture(node) == :x86_64) && ::Chef::Platform.windows?)
+ if ( node_windows_architecture(node) == :x86_64) && ::Chef::Platform.windows?
Chef::ReservedNames::Win32::System.wow64_disable_wow64_fs_redirection
end
end
def restore_wow64_file_redirection( node, original_redirection_state )
- if ( (node_windows_architecture(node) == :x86_64) && ::Chef::Platform.windows?)
+ if (node_windows_architecture(node) == :x86_64) && ::Chef::Platform.windows?
Chef::ReservedNames::Win32::System.wow64_revert_wow64_fs_redirection(original_redirection_state)
end
end
diff --git a/lib/chef/mixin/windows_env_helper.rb b/lib/chef/mixin/windows_env_helper.rb
index b2e08edc08..51806da31d 100644
--- a/lib/chef/mixin/windows_env_helper.rb
+++ b/lib/chef/mixin/windows_env_helper.rb
@@ -43,12 +43,12 @@ class Chef
flags = SMTO_BLOCK | SMTO_ABORTIFHUNG | SMTO_NOTIMEOUTIFNOTHUNG
# for why two calls, see:
# http://stackoverflow.com/questions/4968373/why-doesnt-sendmessagetimeout-update-the-environment-variables
- if ( SendMessageTimeoutA(HWND_BROADCAST, WM_SETTINGCHANGE, 0, FFI::MemoryPointer.from_string("Environment").address, flags, 5000, nil) == 0 )
+ if SendMessageTimeoutA(HWND_BROADCAST, WM_SETTINGCHANGE, 0, FFI::MemoryPointer.from_string("Environment").address, flags, 5000, nil) == 0
Chef::ReservedNames::Win32::Error.raise!
end
- if ( SendMessageTimeoutW(HWND_BROADCAST, WM_SETTINGCHANGE, 0, FFI::MemoryPointer.from_string(
+ if SendMessageTimeoutW(HWND_BROADCAST, WM_SETTINGCHANGE, 0, FFI::MemoryPointer.from_string(
utf8_to_wide("Environment")
- ).address, flags, 5000, nil) == 0 )
+ ).address, flags, 5000, nil) == 0
Chef::ReservedNames::Win32::Error.raise!
end
end