mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8201649: Remove dubious call_jio_print in ostream.cpp
Reviewed-by: stuefe, dholmes
This commit is contained in:
parent
1c744f99a5
commit
a9b0242eef
2 changed files with 10 additions and 31 deletions
|
@ -2768,15 +2768,14 @@ JNIEXPORT int jio_printf(const char *fmt, ...) {
|
|||
return len;
|
||||
}
|
||||
|
||||
|
||||
// HotSpot specific jio method
|
||||
void jio_print(const char* s) {
|
||||
void jio_print(const char* s, size_t len) {
|
||||
// Try to make this function as atomic as possible.
|
||||
if (Arguments::vfprintf_hook() != NULL) {
|
||||
jio_fprintf(defaultStream::output_stream(), "%s", s);
|
||||
jio_fprintf(defaultStream::output_stream(), "%.*s", (int)len, s);
|
||||
} else {
|
||||
// Make an unused local variable to avoid warning from gcc 4.x compiler.
|
||||
size_t count = ::write(defaultStream::output_fd(), s, (int)strlen(s));
|
||||
size_t count = ::write(defaultStream::output_fd(), s, (int)len);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue