mirror of https://github.com/ARMmbed/mbed-os.git
mbed_error: remove redundant memset
If we want zero-fill, strncpy does it anyway.pull/8441/head
parent
c2076b5ec4
commit
25d0fbaaeb
|
@ -122,7 +122,6 @@ static mbed_error_status_t handle_error(mbed_error_status_t error_status, unsign
|
|||
#if MBED_CONF_PLATFORM_ERROR_FILENAME_CAPTURE_ENABLED
|
||||
//Capture filename/linenumber if provided
|
||||
//Index for tracking error_filename
|
||||
memset(¤t_error_ctx.error_filename, 0, MBED_CONF_PLATFORM_MAX_ERROR_FILENAME_LEN);
|
||||
strncpy(current_error_ctx.error_filename, filename, MBED_CONF_PLATFORM_MAX_ERROR_FILENAME_LEN);
|
||||
current_error_ctx.error_line_number = line_number;
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue