diff options
author | Tim Smith <tsmith84@gmail.com> | 2020-10-27 10:51:51 -0700 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2020-10-27 10:51:51 -0700 |
commit | 5122f9f77f89ba026e77b36062b70b241c552792 (patch) | |
tree | 75a930f73e58e84a91707b10d86148af8b1a55a8 /lib/chef/win32/security | |
parent | b3dbca14e1b587f4367acf082392fb3aea7bb872 (diff) | |
download | chef-5122f9f77f89ba026e77b36062b70b241c552792.tar.gz |
Merge repetitive conditionals
So much easier to read and probably faster this way too.
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib/chef/win32/security')
-rw-r--r-- | lib/chef/win32/security/sid.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/win32/security/sid.rb b/lib/chef/win32/security/sid.rb index ed6c7bd65d..aaf3532fc4 100644 --- a/lib/chef/win32/security/sid.rb +++ b/lib/chef/win32/security/sid.rb @@ -321,7 +321,7 @@ class Chef while status == ERROR_MORE_DATA status = NetUserEnum(servername, level, filter, bufptr, prefmaxlen, entriesread, totalentries, resume_handle) - if status == NERR_Success || status == ERROR_MORE_DATA + if [NERR_Success, ERROR_MORE_DATA].include?(status) Array.new(entriesread.read_long) do |i| user_info = USER_INFO_3.new(bufptr.read_pointer + i * USER_INFO_3.size) # Check if the account is the Administrator account |