Skip to content

Commit 14f3f7c

Browse files
authored
Merge pull request #25 from lijunru-hub/fix/video_uninitialized_value
fix(video): fix uninitialized value
2 parents 9ef3d18 + ff7f67d commit 14f3f7c

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/class/video/video_device.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,8 @@ static bool _negotiate_streaming_parameters(videod_streaming_interface_t const *
542542
tusb_desc_cs_video_fmt_t const *fmt = _find_desc_format(tu_desc_next(vs), end, fmtnum);
543543
tusb_desc_cs_video_frm_t const *frm = _find_desc_frame(tu_desc_next(fmt), end, frmnum);
544544

545-
uint_fast32_t interval, interval_ms;
545+
uint_fast32_t interval = 0;
546+
uint_fast32_t interval_ms = 0;
546547
switch (request) {
547548
case VIDEO_REQUEST_GET_MAX:
548549
{

src/portable/synopsys/dwc2/dcd_dwc2.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -674,10 +674,10 @@ static bool dcd_edpt_counter_available(uint8_t rhport, uint8_t dir)
674674
static bool dcd_edpt_counter_release(uint8_t rhport, uint8_t dir)
675675
{
676676
if (dir) {
677-
TU_ASSERT(dwc2_ep_counters[rhport].active_in == 0); // Check if number of opened EPs is not zero
677+
TU_ASSERT(dwc2_ep_counters[rhport].active_in != 0); // Check if number of opened EPs is not zero
678678
dwc2_ep_counters[rhport].active_in--; // Decrease endpoint counter
679679
} else {
680-
TU_ASSERT(dwc2_ep_counters[rhport].active_out == 0);
680+
TU_ASSERT(dwc2_ep_counters[rhport].active_out != 0);
681681
dwc2_ep_counters[rhport].active_out--;
682682
}
683683
return true;

0 commit comments

Comments
 (0)