Skip to content

arp: remove dead redundant hw-type fallback check - #71

Open
sakh-ML wants to merge 1 commit into
ecki:masterfrom
sakh-ML:remove-dead-hwtype-check
Open

sakh-ML wants to merge 1 commit into
ecki:masterfrom
sakh-ML:remove-dead-hwtype-check

Conversation

@sakh-ML

@sakh-ML sakh-ML commented Sep 20, 2026

Copy link
Copy Markdown

hw already gets set to the default type earlier in main() before argument parsing. This block just repeats that same check when no -H/-t option was given, so it can never actually do anything different. Removing it as dead code.

@ecki

ecki commented Sep 24, 2026 •

Copy link
Copy Markdown
Owner

Your right it’s a duplicate, but I think I would rather remove the first one, there is no point in warning about a missing hardware type if the user specified a different one (hmm.. unless the default is used in other places)

@ecki ecki left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It’s a possible way, but maybe better delete the early block.

Move default hardware type initialization after getopt_long.
If no -H or -t option was specified, fall back to default.
@sakh-ML
sakh-ML force-pushed the remove-dead-hwtype-check branch from cc16db2 to 1ae5c18 Compare September 24, 2026 18:59
@sakh-ML
sakh-ML requested a review from ecki September 27, 2026 18:38
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.

2 participants