summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root>2008-05-02 08:08:45 +0000
committerroot <root>2008-05-02 08:08:45 +0000
commit6703b4811bdb7ffbd3b59103fde928526ecc349d (patch)
tree4728baf3d5892d239ba952397ce28fd5026dcbcc
parentd9c3e6066969ec74af233dba00f7b20a7cac4342 (diff)
fix an aliasing issue
-rw-r--r--Changes1
-rw-r--r--ev.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/Changes b/Changes
index 449eea7..2defb61 100644
--- a/Changes
+++ b/Changes
@@ -3,6 +3,7 @@ Revision history for libev, a high-performance and full-featured event loop.
- use 1-based heaps, simplifies code, reduces codesize, makes
for better cache-efficiency and increases memory requirements
by up to two pointers/loop.
+ - fix a potential aliasing issue.
3.31 Wed Apr 16 20:45:04 CEST 2008
- added last minute fix for ev_poll.c by Brandon Black.
diff --git a/ev.c b/ev.c
index 634c079..e05b54f 100644
--- a/ev.c
+++ b/ev.c
@@ -327,6 +327,7 @@ typedef ev_watcher *W;
typedef ev_watcher_list *WL;
typedef ev_watcher_time *WT;
+#define ev_active(w) ((W)(w))->active
#define ev_at(w) ((WT)(w))->at
#if EV_USE_MONOTONIC
@@ -1940,7 +1941,7 @@ ev_timer_again (EV_P_ ev_timer *w)
}
else if (w->repeat)
{
- w->at = w->repeat;
+ ev_at (w) = w->repeat;
ev_timer_start (EV_A_ w);
}
}