simplify: use STAT_T_MAX constant in _stat_for instead of magic literal#72
Draft
Koan-Bot wants to merge 1 commit intocpan-authors:mainfrom
Draft
simplify: use STAT_T_MAX constant in _stat_for instead of magic literal#72Koan-Bot wants to merge 1 commit intocpan-authors:mainfrom
Koan-Bot wants to merge 1 commit intocpan-authors:mainfrom
Conversation
…al 13 Replace `( (0) x 13 )` with `( (0) x STAT_T_MAX )` to remove the magic number and its comment. STAT_T_MAX is already used in _normalize_stat_result and is available at this point since the XS module is loaded in BEGIN. Fixes cpan-authors#65 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replace the magic literal
13in_stat_forwith theSTAT_T_MAXconstant already used elsewhere in the module. This removes a comment-as-documentation anti-pattern and ensures consistency with_normalize_stat_result.Fixes #65
Changes
( (0) x 13 ) # STAT_T_MAXwith( (0) x STAT_T_MAX )in_stat_forTest plan
make test: 1250 tests, 0 failures)Generated by Kōan /fix
Quality Report
Changes: 1 file changed, 1 insertion(+), 1 deletion(-)
Code scan: clean
Tests: passed (0 Tests)
Branch hygiene: 1 issue(s)
Generated by Kōan post-mission quality pipeline