sinowealth-nubwo: idiomatically zero initialize a struct

This commit is contained in:
Yaroslav Chvanov
2023-05-20 00:12:46 +03:00
parent cfab554ea8
commit b717f946ef

View File

@@ -243,8 +243,7 @@ static uint8_t normalize_brightness(int brightness)
static int
sinowealthnubwo_set_aesthetic(struct ratbag_device *device, struct ratbag_led *led) {
struct sinowealthnubwo_aesthetic_report report;
memset(&report, 0, sizeof(struct sinowealthnubwo_aesthetic_report));
struct sinowealthnubwo_aesthetic_report report = {0};
report.report_id = SINOWEALTHNUBWO_AESTHETIC_CMD_REPORTID;
memcpy(report.cmd, AESTHETIC_CMD, ARRAY_LENGTH(AESTHETIC_CMD));
report.r = led->color.red;