Skip to content

Commit 7e971c5

Browse files
(PUP-11767) Fix InfiniteLoop violations and remove from rubocop_todo
1 parent 46cfb79 commit 7e971c5

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

.rubocop_todo.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -518,11 +518,6 @@ Style/IfWithSemicolon:
518518
Style/ImplicitRuntimeError:
519519
Enabled: false
520520

521-
# This cop supports unsafe auto-correction (--auto-correct-all).
522-
Style/InfiniteLoop:
523-
Exclude:
524-
- 'lib/puppet/util/posix.rb'
525-
526521
# This cop supports unsafe auto-correction (--auto-correct-all).
527522
# Configuration parameters: InverseMethods, InverseBlocks.
528523
Style/InverseMethods:

lib/puppet/util/posix.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def get_groups_list(user)
4141
user_gid = Puppet::Etc.getpwnam(user).gid
4242
ngroups = Puppet::FFI::POSIX::Constants::MAXIMUM_NUMBER_OF_GROUPS
4343

44-
while true do
44+
loop do
4545
FFI::MemoryPointer.new(:int) do |ngroups_ptr|
4646
FFI::MemoryPointer.new(:uint, ngroups) do |groups_ptr|
4747
old_ngroups = ngroups

0 commit comments

Comments
 (0)