mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-29 23:06:41 +00:00
Avoid using word 'crazy' (#11396)
Avoid using word 'crazy' and simplify the comment of else branch
This commit is contained in:
parent
5ae461ec0a
commit
eca4cbc419
1 changed files with 2 additions and 3 deletions
|
|
@ -52,10 +52,9 @@ char* __cxa_demangle(const char* mangled_name, char* buf, size_t* n, int* status
|
|||
if (!initialize_output_buffer(buf, n, buf_size, 1024)) {
|
||||
internal_status = DEMANGLE_MEMORY_ALLOCATION_FAILURE;
|
||||
} else {
|
||||
// This might cause a truncated mangled name being returned without error,
|
||||
// but should be fine for debugging purpose.
|
||||
strncpy(buf, mangled_name, buf_size);
|
||||
// Blindly guard the output buffer, this might cause a truncated mangled name being returned without error status,
|
||||
// but this should be fine for debugging purpose. As we are returning the mangle name directly, if the caller is
|
||||
// doing crazy stuff with the name, it should both fail with the return mangled name and a truncated mangled name.
|
||||
buf[buf_size - 1] = '\0';
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue