Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
56e432b2
Commit
56e432b2
authored
May 26, 2014
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avutil/atomic: reuse ret to avoid dereferencing twice the same value.
parent
cc914885
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
atomic.c
libavutil/atomic.c
+1
-1
No files found.
libavutil/atomic.c
View file @
56e432b2
...
@@ -64,7 +64,7 @@ void *avpriv_atomic_ptr_cas(void * volatile *ptr, void *oldval, void *newval)
...
@@ -64,7 +64,7 @@ void *avpriv_atomic_ptr_cas(void * volatile *ptr, void *oldval, void *newval)
void
*
ret
;
void
*
ret
;
pthread_mutex_lock
(
&
atomic_lock
);
pthread_mutex_lock
(
&
atomic_lock
);
ret
=
*
ptr
;
ret
=
*
ptr
;
if
(
*
ptr
==
oldval
)
if
(
ret
==
oldval
)
*
ptr
=
newval
;
*
ptr
=
newval
;
pthread_mutex_unlock
(
&
atomic_lock
);
pthread_mutex_unlock
(
&
atomic_lock
);
return
ret
;
return
ret
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment