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

Fix printf family usage #143

Merged
merged 2 commits into from
Feb 23, 2018
Merged

Fix printf family usage #143

merged 2 commits into from
Feb 23, 2018

Conversation

ikeydoherty
Copy link
Contributor

  • Fix use of asprintf to be correct and silence compiler warnings
  • Only use fprintf when actually needed, otherwise use fputs (avoid unnecessary allocations)

This mutes compiler warnings for `dlwrap.c` by ensuring we actually check
the return status of the `asprintf` call. At this point in the test suite
our possible failure here is only memory, so we'll abort.

Signed-off-by: Ikey Doherty <ikey@solus-project.com>
This avoids any unnecessary allocations when simply passing static strings
to be printed onto stderr, and uses the simpler fputs mechanism.

Signed-off-by: Ikey Doherty <ikey@solus-project.com>
@ebassi ebassi merged commit 64fc3ac into anholt:master Feb 23, 2018
@ebassi
Copy link
Collaborator

ebassi commented Feb 23, 2018

Thanks!

@ikeydoherty
Copy link
Contributor Author

np :)

joebonrichie pushed a commit to solus-packages/libepoxy that referenced this pull request Aug 14, 2023
Upstream PR for Solus fixes: anholt/libepoxy#143

Signed-off-by: Ikey Doherty <ikey@solus-project.com>
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.

None yet

2 participants