summaryrefslogtreecommitdiff
path: root/src/class/video
diff options
context:
space:
mode:
authorhathach <[email protected]>2025-11-03 16:36:07 +0700
committerhathach <[email protected]>2025-11-04 19:56:53 +0700
commit8979af34c0e5b97520070bcfdffe5280de9ac24c (patch)
tree4ca427d8a2bd73baedd52d1076e8386b447a85d0 /src/class/video
parent22f01aea0d31b5a54532877d02d61f51041aeb6f (diff)
Fixed more alert found by PVS-Studio
Diffstat (limited to 'src/class/video')
-rw-r--r--src/class/video/video_device.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/class/video/video_device.c b/src/class/video/video_device.c
index 087292e56..14eba86fb 100644
--- a/src/class/video/video_device.c
+++ b/src/class/video/video_device.c
@@ -464,7 +464,9 @@ static bool _update_streaming_parameters(videod_streaming_interface_t const *stm
uint_fast8_t fmtnum = param->bFormatIndex;
TU_ASSERT(vs && fmtnum <= vs->stm.bNumFormats);
if (0 == fmtnum) {
- if (1 < vs->stm.bNumFormats) return true; /* Need to negotiate all variables. */
+ if (1 < vs->stm.bNumFormats) {
+ return true; /* Need to negotiate all variables. */
+ }
fmtnum = 1;
param->bFormatIndex = 1;
}
@@ -1259,7 +1261,7 @@ bool tud_video_n_frame_xfer(uint_fast8_t ctl_idx, uint_fast8_t stm_idx, void *bu
videod_streaming_interface_t *stm = _get_instance_streaming(ctl_idx, stm_idx);
videod_streaming_epbuf_t *stm_epbuf = &_videod_streaming_epbuf[ctl_idx];
- if ( NULL == stm || 0 == stm->desc.ep[0] || stm->buffer) {
+ if (NULL == stm || 0 == stm->desc.ep[0] || stm->buffer) {
return false;
}
if (stm->state == VS_STATE_PROBING) {