Skip to content

Commit 25d0fba

Browse files
committed
mbed_error: remove redundant memset
If we want zero-fill, strncpy does it anyway.
1 parent c2076b5 commit 25d0fba

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

platform/mbed_error.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ static mbed_error_status_t handle_error(mbed_error_status_t error_status, unsign
122122
#if MBED_CONF_PLATFORM_ERROR_FILENAME_CAPTURE_ENABLED
123123
//Capture filename/linenumber if provided
124124
//Index for tracking error_filename
125-
memset(&current_error_ctx.error_filename, 0, MBED_CONF_PLATFORM_MAX_ERROR_FILENAME_LEN);
126125
strncpy(current_error_ctx.error_filename, filename, MBED_CONF_PLATFORM_MAX_ERROR_FILENAME_LEN);
127126
current_error_ctx.error_line_number = line_number;
128127
#endif

0 commit comments

Comments
 (0)