Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefer fputc over fputs where possible #419

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

RSilicon
Copy link
Contributor

fputc is meant for single characters, fputs is for strings.

@RSilicon RSilicon force-pushed the putc branch 8 times, most recently from 1b07621 to c05128a Compare July 21, 2023 15:49
Copy link

@kalvdans kalvdans left a comment

Choose a reason for hiding this comment

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

I see nothing wrong with the patch, just noting that gcc already does this rewrite at compile-time. Sticking to always calling fprintf instead of mixing function calls enhances readability in my opinion.

fputc is meant for single characters, fputs is meant for strings.
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