git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cc91488
)
avutil/atomic: reuse ret to avoid dereferencing twice the same value.
author
Clément Bœsch
<u@pkh.me>
Mon, 26 May 2014 19:08:32 +0000
(21:08 +0200)
committer
Clément Bœsch
<u@pkh.me>
Sat, 27 Dec 2014 21:14:23 +0000
(22:14 +0100)
libavutil/atomic.c
patch
|
blob
|
history
diff --git
a/libavutil/atomic.c
b/libavutil/atomic.c
index
1fa6308
..
b13725d
100644
(file)
--- a/
libavutil/atomic.c
+++ b/
libavutil/atomic.c
@@
-64,7
+64,7
@@
void *avpriv_atomic_ptr_cas(void * volatile *ptr, void *oldval, void *newval)
void *ret;
pthread_mutex_lock(&atomic_lock);
ret = *ptr;
- if (
*ptr
== oldval)
+ if (
ret
== oldval)
*ptr = newval;
pthread_mutex_unlock(&atomic_lock);
return ret;