Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r1347:b2171f4a0a0b
Date: 2014-09-04 11:19 +0200
http://bitbucket.org/pypy/stmgc/changeset/b2171f4a0a0b/

Log:    Simplify the typecasts

diff --git a/c8/stm/core.c b/c8/stm/core.c
--- a/c8/stm/core.c
+++ b/c8/stm/core.c
@@ -120,16 +120,15 @@
 
 static struct stm_commit_log_entry_s *_validate_and_add_to_commit_log()
 {
-    struct stm_commit_log_entry_s *new;
-    void* *to;
+    struct stm_commit_log_entry_s *new, **to;
 
     new = _create_commit_log_entry();
     fprintf(stderr,"%p\n", new);
     do {
         stm_validate(new);
 
-        to = (void **)&(STM_PSEGMENT->last_commit_log_entry->next);
-    } while (!__sync_bool_compare_and_swap((void**)to, (void**)NULL, 
(void**)new));
+        to = &(STM_PSEGMENT->last_commit_log_entry->next);
+    } while (!__sync_bool_compare_and_swap(to, NULL, new));
 
     return new;
 }
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to