return -1;
}
+static int session_list_count(void)
+{
+ int count = 0;
+ struct ltt_session *iter;
+
+ cds_list_for_each_entry(iter, &session_list->head, list) {
+ count++;
+ }
+ return count;
+}
+
/*
* Empty session list manually.
*/
cds_list_for_each_entry_safe(iter, tmp, &session_list->head, list) {
cds_list_del(&iter->list);
- session_list->count--;
free(iter);
}
/* Session list must be 0 */
- assert(!session_list->count);
+ assert(!session_list_count());
}
/*
}
/* Session list must be 0 */
- assert(!session_list->count);
+ assert(!session_list_count());
return 0;
}
}
/* Session list must be 0 */
- assert(!session_list->count);
+ assert(!session_list_count());
return 0;
}
PRINT_OK();
/* Session list must be 0 */
- assert(!session_list->count);
+ assert(!session_list_count());
/* Success */
return 0;