Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefer for (;;) to while (TRUE) #9219

Merged
merged 1 commit into from Aug 28, 2019
Merged

Prefer for (;;) to while (TRUE) #9219

merged 1 commit into from Aug 28, 2019

Conversation

ghost
Copy link

@ghost ghost commented Aug 27, 2019

Motivation and Context

Defining a special constant to make an infinite loop is excessive, especially when the name clashes with symbols commonly defined on some platforms (ie FreeBSD).

Description

Replace while (TRUE) with for (;;) and eliminate the (re)definition of TRUE from the file.

How Has This Been Tested?

./scripts/zfs-tests.sh -vxT link_count

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (a change to man pages or other documentation)

Checklist:

Defining a special constant to make an infinite loop is excessive,
especially when the name clashes with symbols commonly defined on
some platforms (ie FreeBSD).

Signed-off-by: Ryan Moeller <[email protected]>
@codecov
Copy link

codecov bot commented Aug 28, 2019

Codecov Report

Merging #9219 into master will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9219      +/-   ##
==========================================
- Coverage   79.07%   79.06%   -0.02%     
==========================================
  Files         400      400              
  Lines      122008   122008              
==========================================
- Hits        96482    96461      -21     
- Misses      25526    25547      +21
Flag Coverage Δ
#kernel 79.73% <ø> (+0.01%) ⬆️
#user 66.62% <ø> (-0.2%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e7a2fa7...c50a178. Read the comment docs.

@behlendorf behlendorf merged commit 9c9dcd6 into openzfs:master Aug 28, 2019
@ghost ghost deleted the fix-rm_lnkcnt_zero_file branch August 28, 2019 18:38
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Dec 24, 2019
Defining a special constant to make an infinite loop is excessive,
especially when the name clashes with symbols commonly defined on
some platforms (ie FreeBSD).

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: George Melikov <[email protected]>
Reviewed-by: John Kennedy <[email protected]
Signed-off-by: Ryan Moeller <[email protected]>
Closes openzfs#9219
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Dec 27, 2019
Defining a special constant to make an infinite loop is excessive,
especially when the name clashes with symbols commonly defined on
some platforms (ie FreeBSD).

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: George Melikov <[email protected]>
Reviewed-by: John Kennedy <[email protected]
Signed-off-by: Ryan Moeller <[email protected]>
Closes openzfs#9219
tonyhutter pushed a commit that referenced this pull request Jan 23, 2020
Defining a special constant to make an infinite loop is excessive,
especially when the name clashes with symbols commonly defined on
some platforms (ie FreeBSD).

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: George Melikov <[email protected]>
Reviewed-by: John Kennedy <[email protected]
Signed-off-by: Ryan Moeller <[email protected]>
Closes #9219
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants