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