OSSP CVS Repository

ossp - Check-in [3156]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 3156
Date: 2003-Feb-06 14:43:47 (local)
2003-Feb-06 13:43:47 (UTC)
User:mlelstv
Branch:
Comment: bugfix pulled up from sa/ts.c
Tickets:
Inspections:
Files:
ossp-pkg/al/ts.c      1.1 -> 1.2     10 inserted, 6 deleted

ossp-pkg/al/ts.c 1.1 -> 1.2

--- ts.c 2002/12/16 12:24:52     1.1
+++ ts.c 2003/02/06 13:43:47     1.2
@@ -76,6 +76,10 @@
     for ((ep)  = RING_FIRST((hp)); \
          (ep) != RING_SENTINEL((hp), elem, link); \
          (ep)  = RING_NEXT((ep), link))
+#define RING_FOREACH_LA(ep, epT, hp, elem, link) \
+    for ((ep)  = RING_FIRST((hp)), (epT) = RING_NEXT((ep), link); \
+         (ep) != RING_SENTINEL((hp), elem, link); \
+         (ep)  = (epT), (epT) = RING_NEXT((epT), link))
 
 /* test suite test log */
 struct tstl_st;
@@ -367,15 +371,15 @@
 /* destroy test suite */
 void ts_suite_free(ts_suite_t *ts)
 {
-    ts_test_t *tst;
-    tstc_t *tstc;
-    tstl_t *tstl;
+    ts_test_t *tst, *tstT;
+    tstc_t *tstc, *tstcT;
+    tstl_t *tstl, *tstlT;
 
     if (ts == NULL)
         return;
-    RING_FOREACH(tst, &ts->tests, ts_test_t, next) {
-        RING_FOREACH(tstc, &tst->checks, tstc_t, next) {
-            RING_FOREACH(tstl, &tstc->logs, tstl_t, next) {
+    RING_FOREACH_LA(tst, tstT, &ts->tests, ts_test_t, next) {
+        RING_FOREACH_LA(tstc, tstcT, &tst->checks, tstc_t, next) {
+            RING_FOREACH_LA(tstl, tstlT, &tstc->logs, tstl_t, next) {
                 free(tstl->text);
             }
             free(tstc->title);

CVSTrac 2.0.1