Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
5fd6557c
Commit
5fd6557c
authored
3 months ago
by
Deucе
Browse files
Options
Downloads
Patches
Plain Diff
Some especially silly Coverity-induced paranoia.
parent
62c8638b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!488
Overhaul LZH code
Pipeline
#7530
passed
3 months ago
Stage: build
Stage: test
Stage: cleanup
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/xpdev/xpbeep.c
+10
-7
10 additions, 7 deletions
src/xpdev/xpbeep.c
with
10 additions
and
7 deletions
src/xpdev/xpbeep.c
+
10
−
7
View file @
5fd6557c
...
...
@@ -834,7 +834,7 @@ do_xp_play_sample(unsigned char *sampo, size_t sz, int *freed)
int
need_copy
=
0
;
#endif
#ifdef AFMT_U8
in
t
wr
;
size_
t
wr
;
int
i
;
#endif
...
...
@@ -976,12 +976,15 @@ do_xp_play_sample(unsigned char *sampo, size_t sz, int *freed)
#endif
#ifdef AFMT_U8
if
(
handle_type
==
SOUND_DEVICE_OSS
)
{
wr
=
0
;
while
(
wr
<
sz
)
{
i
=
write
(
dsp
,
samp
+
wr
,
sz
-
wr
);
if
(
i
>=
0
)
wr
+=
i
;
if
(
handle_type
==
SOUND_DEVICE_OSS
)
{
wr
=
0
;
while
(
wr
<
sz
)
{
i
=
write
(
dsp
,
samp
+
wr
,
sz
-
wr
);
if
(
i
>=
0
)
{
if
((
SIZE_MAX
-
i
)
<
wr
)
wr
=
SIZE_MAX
;
wr
+=
i
;
}
}
return
true
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment