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

printf() and puts() fixes #1759

Merged
merged 2 commits into from
Aug 21, 2017
Merged

printf() and puts() fixes #1759

merged 2 commits into from
Aug 21, 2017

Conversation

jforissier
Copy link
Contributor

No description provided.

@jenswi-linaro
Copy link
Contributor

Reviewed-by: Jens Wiklander <[email protected]>

Our implementation of printf() does not comply with the standards,
because it adds a prefix to the output and may print truncation
characters. By doing so it becomes inconsistent with puts(). It is a
problem because the compiler has the ability to perform optimizations
and, in some cases, may invoke puts() instead of printf().

Therefore, remove any output that is not strictly specified in the
printf() parameters.

Signed-off-by: Jerome Forissier <[email protected]>
Reviewed-by: Jens Wiklander <[email protected]>
puts() should print the supplied string and a trailing newline. Fix it
accordingly.

Signed-off-by: Jerome Forissier <[email protected]>
Reviewed-by: Jens Wiklander <[email protected]>
@jforissier jforissier merged commit 6246cc9 into OP-TEE:master Aug 21, 2017
@jforissier jforissier deleted the printf-puts branch August 21, 2017 16:22
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