Skip to content

Commit

Permalink
Merge pull request #25 from lijunru-hub/fix/video_uninitialized_value
Browse files Browse the repository at this point in the history
fix(video): fix uninitialized value
  • Loading branch information
roma-jam authored May 7, 2024
2 parents 9ef3d18 + ff7f67d commit 14f3f7c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/class/video/video_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,8 @@ static bool _negotiate_streaming_parameters(videod_streaming_interface_t const *
tusb_desc_cs_video_fmt_t const *fmt = _find_desc_format(tu_desc_next(vs), end, fmtnum);
tusb_desc_cs_video_frm_t const *frm = _find_desc_frame(tu_desc_next(fmt), end, frmnum);

uint_fast32_t interval, interval_ms;
uint_fast32_t interval = 0;
uint_fast32_t interval_ms = 0;
switch (request) {
case VIDEO_REQUEST_GET_MAX:
{
Expand Down
4 changes: 2 additions & 2 deletions src/portable/synopsys/dwc2/dcd_dwc2.c
Original file line number Diff line number Diff line change
Expand Up @@ -674,10 +674,10 @@ static bool dcd_edpt_counter_available(uint8_t rhport, uint8_t dir)
static bool dcd_edpt_counter_release(uint8_t rhport, uint8_t dir)
{
if (dir) {
TU_ASSERT(dwc2_ep_counters[rhport].active_in == 0); // Check if number of opened EPs is not zero
TU_ASSERT(dwc2_ep_counters[rhport].active_in != 0); // Check if number of opened EPs is not zero
dwc2_ep_counters[rhport].active_in--; // Decrease endpoint counter
} else {
TU_ASSERT(dwc2_ep_counters[rhport].active_out == 0);
TU_ASSERT(dwc2_ep_counters[rhport].active_out != 0);
dwc2_ep_counters[rhport].active_out--;
}
return true;
Expand Down

0 comments on commit 14f3f7c

Please sign in to comment.