This is an automated email from the ASF dual-hosted git repository. GUIDINGLI pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
commit 031f918b29819be17e5e7a8214a7f15cbf283905 Author: jiangbo11 <[email protected]> AuthorDate: Mon Jul 21 14:48:20 2025 +0800 nxplayer: check mq_close() and drop an always-true assertion The return value of mq_close() was ignored on the error path; wrap it in DEBUGVERIFY() so a failure is not silently dropped. subsample is an unsigned byte and AUDIO_SUBSAMPLE_NONE is zero, so the lower bound of the assertion can never be violated. Keep only the upper bound to avoid comparing an unsigned value against zero. Signed-off-by: jiangbo11 <[email protected]> --- system/nxplayer/nxplayer.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/system/nxplayer/nxplayer.c b/system/nxplayer/nxplayer.c index dc4713c0d..3cea30093 100644 --- a/system/nxplayer/nxplayer.c +++ b/system/nxplayer/nxplayer.c @@ -1251,7 +1251,7 @@ err_out: close(pplayer->dev_fd); /* Close the device */ pplayer->dev_fd = -1; /* Mark device as closed */ - mq_close(pplayer->mq); /* Close the message queue */ + DEBUGVERIFY(mq_close(pplayer->mq)); /* Close the message queue */ mq_unlink(pplayer->mqname); /* Unlink the message queue */ pplayer->ops = NULL; /* Clear offload parser */ @@ -1607,8 +1607,7 @@ int nxplayer_fforward(FAR struct nxplayer_s *pplayer, uint8_t subsample) struct audio_caps_desc_s cap_desc; int ret; - DEBUGASSERT(pplayer && subsample >= AUDIO_SUBSAMPLE_NONE && - subsample <= AUDIO_SUBSAMPLE_MAX); + DEBUGASSERT(pplayer && subsample <= AUDIO_SUBSAMPLE_MAX); /* Send a CONFIGURE ioctl to the device to set the forward rate */
