Address offline Coverity issue

This Coverity issue was encountered in a private build, but does not
appear to be in the Github CI build. Coverity is suspecting a copy-paste
betweem these lines in sound.c:-

1838: xstream_copyin(s, &g_stream_inp->data[g_stream_inp->size - g_bytes_in_stream], i);
1844: xstream_copyin(s, &g_stream_inp->data[g_stream_inp->size - g_bytes_in_stream], g_bytes_in_stream);

An inspection of the code shows this to bre a false positive
This commit is contained in:
matt335672
2025-02-05 10:14:18 +00:00
parent f7543c2586
commit 6088ba3f3b
+1
View File
@@ -1835,6 +1835,7 @@ sound_sndsrvr_source_data_in(struct trans *trans)
if (i < g_bytes_in_stream)
{
//coverity[COPY_PASTE_ERROR:FALSE]
xstream_copyin(s, &g_stream_inp->data[g_stream_inp->size - g_bytes_in_stream], i);
bytes_read += i;
g_bytes_in_stream -= i;