summaryrefslogtreecommitdiff
path: root/src/libimcv/pts/pts_pcr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libimcv/pts/pts_pcr.c')
-rw-r--r--src/libimcv/pts/pts_pcr.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/libimcv/pts/pts_pcr.c b/src/libimcv/pts/pts_pcr.c
index d514532c5..9f098c08e 100644
--- a/src/libimcv/pts/pts_pcr.c
+++ b/src/libimcv/pts/pts_pcr.c
@@ -111,17 +111,12 @@ typedef struct {
private_pts_pcr_t *pcrs;
} pcr_enumerator_t;
-/**
- * Implementation of enumerator.enumerate
- */
-static bool pcr_enumerator_enumerate(pcr_enumerator_t *this, ...)
+METHOD(enumerator_t, pcr_enumerator_enumerate, bool,
+ pcr_enumerator_t *this, va_list args)
{
- uint32_t *pcr, i, f;
- va_list args;
+ uint32_t i, f, *pcr;
- va_start(args, this);
- pcr = va_arg(args, uint32_t*);
- va_end(args);
+ VA_ARGS_VGET(args, pcr);
while (this->pcr <= this->pcrs->pcr_max)
{
@@ -148,7 +143,8 @@ METHOD(pts_pcr_t, create_enumerator, enumerator_t*,
INIT(enumerator,
.public = {
- .enumerate = (void*)pcr_enumerator_enumerate,
+ .enumerate = enumerator_enumerate_default,
+ .venumerate = _pcr_enumerator_enumerate,
.destroy = (void*)free,
},
.pcrs = this,