Skip to content

fix: replace inverted EXIT_SUCCESS/EXIT_FAILURE with correct 0/1 retu…#20

Merged
scovl merged 1 commit intomainfrom
fix/inverted-return-semantics-in-process-line
Mar 20, 2026
Merged

fix: replace inverted EXIT_SUCCESS/EXIT_FAILURE with correct 0/1 retu…#20
scovl merged 1 commit intomainfrom
fix/inverted-return-semantics-in-process-line

Conversation

@scovl
Copy link
Copy Markdown
Owner

@scovl scovl commented Mar 20, 2026

…rns in process_line()

process_line() was using EXIT_SUCCESS (0) to signal errors and EXIT_FAILURE (1) to signal success. While the numeric logic happened to work with the caller's !process_line() check, the macro semantics were inverted, creating a maintenance trap for future developers.

Replace with plain 0 (failure) and 1 (success) literals to match the intended boolean semantics.

…rns in process_line()

process_line() was using EXIT_SUCCESS (0) to signal errors and
EXIT_FAILURE (1) to signal success. While the numeric logic happened
to work with the caller's !process_line() check, the macro semantics
were inverted, creating a maintenance trap for future developers.

Replace with plain 0 (failure) and 1 (success) literals to match
the intended boolean semantics.
@scovl scovl merged commit edaab59 into main Mar 20, 2026
1 check passed
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.

1 participant