Fix memset invocation in rx/event-t.c
[openafs.git] / tests / rx / event-t.c
index c66ef71..2812fa5 100644 (file)
@@ -6,7 +6,7 @@
 #include <roken.h>
 #include <pthread.h>
 
-#include <tap/basic.h>
+#include <tests/tap/basic.h>
 
 #include "rx/rx_event.h"
 #include "rx/rx_clock.h"
@@ -45,7 +45,7 @@ eventSub(struct rxevent *event, void *arg, void *arg1, int arg2)
     struct testEvent *evrecord = arg;
 
     pthread_mutex_lock(&eventListMutex);
-    rxevent_Put(evrecord->event);
+    rxevent_Put(&evrecord->event);
     evrecord->event = NULL;
     evrecord->fired = 1;
     pthread_mutex_unlock(&eventListMutex);
@@ -105,7 +105,7 @@ main(void)
     pthread_mutex_init(&eventMutex, NULL);
     pthread_cond_init(&eventCond, NULL);
 
-    memset(events, sizeof(events), 0);
+    memset(events, 0, sizeof(events));
     pthread_mutex_init(&eventListMutex, NULL);
 
     /* Start up the event system */
@@ -116,7 +116,7 @@ main(void)
     /* Test for a problem when there is only a single event in the tree */
     event = rxevent_Post(&now, &now, reportSub, NULL, NULL, 0);
     ok(event != NULL, "Created a single event");
-    rxevent_Cancel(&event, NULL, 0);
+    rxevent_Cancel(&event);
     ok(1, "Cancelled a single event");
     rxevent_RaiseEvents(&now);
     ok(1, "RaiseEvents happened without error");
@@ -148,7 +148,7 @@ main(void)
            int victim = random() % counter;
 
            if (events[victim].event != NULL) {
-               rxevent_Cancel(&events[victim].event, NULL, 0);
+               rxevent_Cancel(&events[victim].event);
                events[victim].cancelled = 1;
            }
        }