[pulseaudio-commits] r2493 - /trunk/src/pulsecore/atomic.h

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Tue Jun 3 01:40:32 PDT 2008


Author: lennart
Date: Tue Jun  3 10:40:30 2008
New Revision: 2493

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=2493&root=pulseaudio&view=rev
Log:
fix a compiler warning on ARM due to missing cast, patch from Jyri Sarha

Modified:
    trunk/src/pulsecore/atomic.h

Modified: trunk/src/pulsecore/atomic.h
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/pulsecore/atomic.h?rev=2493&root=pulseaudio&r1=2492&r2=2493&view=diff
==============================================================================
--- trunk/src/pulsecore/atomic.h (original)
+++ trunk/src/pulsecore/atomic.h Tue Jun  3 10:40:30 2008
@@ -380,9 +380,9 @@
 
 /* Returns non-zero when the operation was successful. */
 static inline int pa_atomic_cmpxchg(pa_atomic_t *a, int old_i, int new_i) {
-    int failed = 1;
-    do {
-      failed = __kernel_cmpxchg(old_i, new_i, &a->value);
+    pa_bool_t failed;
+    do {
+      failed = !!__kernel_cmpxchg(old_i, new_i, &a->value);
     } while(failed && a->value == old_i);
     return !failed;
 }
@@ -404,10 +404,10 @@
 }
 
 static inline int pa_atomic_ptr_cmpxchg(pa_atomic_ptr_t *a, void *old_p, void* new_p) {
-    int failed = 1;
-    do {
-        failed = __kernel_cmpxchg_u((unsigned long) old_p, (unsigned long) new_p, &a->value);
-    } while(failed && a->value == old_p);
+    pa_bool_t failed;
+    do {
+        failed = !!__kernel_cmpxchg_u((unsigned long) old_p, (unsigned long) new_p, &a->value);
+    } while(failed && a->value == (unsigned long) old_p);
     return !failed;
 }
 




More information about the pulseaudio-commits mailing list