Skip to content

Conversation

@naoNao89
Copy link
Contributor

i found and fixed some exact duplicates. Extracted shared logic into helper functions get_computer_name() for Windows API calls and os_from_cstring_impl() for Unix C strings.

- Extract common GetComputerNameExW pattern into get_computer_name() helper
- Consolidate duplicate ERR_MORE_DATA error check
- Consolidate duplicate buffer allocation pattern in devicename/hostname
- No functional changes, improves maintainability
@naoNao89 naoNao89 force-pushed the refactor/remove-critical-duplicates branch from 07c3245 to 1dfcb0b Compare December 21, 2025 19:16
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