Skip to content

Commit

Permalink
[Edgecore][device][platform] Fixed Semgrep check error 2 (modules/acc…
Browse files Browse the repository at this point in the history
…ton_as9736_64d_psu.c).

Signed-off-by: michael_shih <michael_shih@edge-core.com>
  • Loading branch information
ec-michael-shih committed Dec 2, 2022
1 parent 4a47dd0 commit bd7b980
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -278,9 +278,12 @@ static struct as9736_64d_psu_data *as9736_64d_psu_update_device(struct device *d
/* Read model name */
#ifdef __STDC_LIB_EXT1__
memset_s(data->model_name, sizeof(data->model_name), 0, sizeof(data->model_name));
memset_s(data->serial_number, sizeof(data->model_name), 0, sizeof(data->serial_number));
#else
memset(data->model_name, 0, sizeof(data->model_name));
#endif
#ifdef __STDC_LIB_EXT1__
memset_s(data->serial_number, sizeof(data->model_name), 0, sizeof(data->serial_number));
#else
memset(data->serial_number, 0, sizeof(data->serial_number));
#endif
power_good = (data->status_pwr_good >> (1-data->index) & 0x1);
Expand Down

0 comments on commit bd7b980

Please sign in to comment.