From 9d1b5210b0f13187e781ee45451237e44da98711 Mon Sep 17 00:00:00 2001 From: Zakir Durumeric Date: Thu, 29 Aug 2013 15:07:56 -0400 Subject: [PATCH] fieldset to support 32-bit systems --- src/fieldset.c | 4 ++-- src/fieldset.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/fieldset.c b/src/fieldset.c index 4df5e7f..28a2016 100644 --- a/src/fieldset.c +++ b/src/fieldset.c @@ -38,7 +38,7 @@ static inline void fs_add_word(fieldset_t *fs, const char *name, int type, f->type = type; f->name = name; f->len = len; - f->value = value; + f->value = (uint64_t) value; f->free_ = free_; } @@ -86,7 +86,7 @@ void fs_free(fieldset_t *fs) for (int i=0; i < fs->len; i++) { field_t *f = &(fs->fields[i]); if (f->free_) { - free(f->value); + free((void*) f->value); } } free(fs); diff --git a/src/fieldset.h b/src/fieldset.h index c2a1e39..7e20d15 100644 --- a/src/fieldset.h +++ b/src/fieldset.h @@ -41,7 +41,7 @@ typedef struct field { int type; int free_; size_t len; - void *value; + uint64_t value; } field_t; // data structure that is populated by the probe module