diff --git a/src/target_scale.c b/src/target_scale.c
index 5c5e9aac330ee9be2038c8ba886bfe257b3c5ced..29fecdfd7b5818479437659982226c993934a63d 100644 (file)
--- a/src/target_scale.c
+++ b/src/target_scale.c
/* Calcualte the rate */
if (prev_counter > curr_counter) /* => counter overflow */
{
- if (prev_counter <= 4294967295) /* 32 bit overflow */
- difference = (4294967295 - prev_counter) + curr_counter;
+ if (prev_counter <= 4294967295UL) /* 32 bit overflow */
+ difference = (4294967295UL - prev_counter) + curr_counter;
else /* 64 bit overflow */
- difference = (18446744073709551615U - prev_counter) + curr_counter;
+ difference = (18446744073709551615ULL - prev_counter) + curr_counter;
}
else /* no overflow */
{
static int ts_destroy (void **user_data) /* {{{ */
{
+ ts_data_t **data;
+
if (user_data == NULL)
return (-EINVAL);
- free (*user_data);
- *user_data = NULL;
+ data = (ts_data_t **) user_data;
+
+ free (*data);
+ *data = NULL;
return (0);
} /* }}} int ts_destroy */