Skip to content

Simplify print_string by removing redundant strlen traversal#98

Open
ismaileneskucuk wants to merge 1 commit into
cktan:masterfrom
ismaileneskucuk:simplify-print-string-loop
Open

Simplify print_string by removing redundant strlen traversal#98
ismaileneskucuk wants to merge 1 commit into
cktan:masterfrom
ismaileneskucuk:simplify-print-string-loop

Conversation

@ismaileneskucuk

Copy link
Copy Markdown

This change removes the redundant strlen() call in print_string() and iterates directly over the null-terminated string.

Since the function already processes the string sequentially, precomputing the length introduces an unnecessary extra traversal.

No behavioral changes were introduced.

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