Skip to content

Conversation

@cofyc
Copy link
Owner

@cofyc cofyc commented Jun 13, 2025

Summary

This PR addresses the code style inconsistencies introduced in PR #57, as reported in issue #74:

  • Fix K&R coding style: Restore proper switch-case indentation where case labels align with the switch statement (not indented)
  • Correct return value: Replace EXIT_SUCCESS with 0 in argparse_help_cb_no_exit() function, since EXIT_SUCCESS should only be used with exit() or returned by main()

Changes Made

  1. Fixed switch-case indentation in argparse_options_check() function to follow K&R style used throughout the codebase
  2. Changed return (EXIT_SUCCESS); to return 0; in argparse_help_cb_no_exit() function for proper function return semantics

Test Plan

  • All existing tests pass (make test)
  • Code compiles without warnings (gcc -Wall -Wextra)
  • Verified code style consistency with rest of codebase

Fixes #74

🤖 Generated with Claude Code

- Fix switch-case indentation to follow K&R style (align case labels with switch)
- Replace EXIT_SUCCESS with 0 in non-exit function argparse_help_cb_no_exit()
- EXIT_SUCCESS should only be used with exit() or returned by main()

Fixes #74

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@cofyc cofyc merged commit 5559200 into master Jun 13, 2025
15 checks passed
@cofyc cofyc deleted the fix-code-style-issue-74 branch June 13, 2025 04:11
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.

Inconsistent styles and non-standard code in #57

2 participants