WIP: refactor(core): refactor select_alg to no longer require heap allocation & strncpy() #7

Manually merged
sezieru merged 2 commits from refactor/alt-select into feature/verify-alg 2025-10-15 09:14:48 +00:00
Owner

Refactors select_alg():

  • No longer requires an extra variable pfx.
  • Eliminates need for heap allocation.
  • Eliminates need for strncpy().
  • Eliminates need to call free(), in either select_alg() or in main() (for tok).
  • Simplifies function operation.
  • Allows compiler to optimize as jmp table.
  • Updates associated comments.
Refactors `select_alg()`: - [x] No longer requires an extra variable `pfx`. - [x] Eliminates need for heap allocation. - [x] Eliminates need for `strncpy()`. - [x] Eliminates need to call `free()`, in either `select_alg()` or in `main()` (for `tok`). - [x] Simplifies function operation. - [x] Allows compiler to optimize as jmp table. - [ ] Updates associated comments.
sezieru self-assigned this 2025-10-15 08:46:23 +00:00
Author
Owner

Refactors select_alg():

  • No longer requires an extra variable pfx.
  • Eliminates need for heap allocation.
  • Eliminates need for strncpy().
  • Eliminates need to call free(), in either select_alg() or in main() (for tok).
  • Simplifies function operation.
  • Allows compiler to optimize as jmp table.
  • Updates associated comments.

Pull-ready.

Refactors `select_alg()`: - [x] No longer requires an extra variable `pfx`. - [x] Eliminates need for heap allocation. - [x] Eliminates need for `strncpy()`. - [x] Eliminates need to call `free()`, in either `select_alg()` or in `main()` (for `tok`). - [x] Simplifies function operation. - [x] Allows compiler to optimize as jmp table. - [x] Updates associated comments. **Pull-ready.**
requested review from Owners 2025-10-15 08:54:38 +00:00
sezieru manually merged commit f51000a084 into feature/verify-alg 2025-10-15 09:14:48 +00:00
Sign in to join this conversation.
No reviewers
fosster/Owners
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: fosster/rexcrypt#7
No description provided.