/* flip exists */
} else {
/* original counter is 64bit */
- if (*a>FP32) {
+ if (*a>MAX32) {
if (debug)
- printf("cc64: uint64 - %"PRIu64" + %"PRIu64" = %"PRIu64"\n", *a, *b, (uint64_t)FP64-*a+*b);
- return FP64-*a+*b;
+ printf("cc64: uint64 - %"PRIu64" + %"PRIu64" = %"PRIu64"\n", *a, *b, (uint64_t)MAX64-*a+*b);
+ return MAX64-*a+*b;
/* original counter is 32bit */
} else {
if (debug)
- printf("cc32: uint32 - %"PRIu64" + %"PRIu64" = %"PRIu64"\n", *a, *b, (uint64_t)FP32-*a+*b);
- return FP32-*a+*b;
+ printf("cc32: uint32 - %"PRIu64" + %"PRIu64" = %"PRIu64"\n", *a, *b, (uint64_t)MAX32-*a+*b);
+ return MAX32-*a+*b;
}
}
}
#define ONELINEVERSION 1
/* integer limits */
-#define FP32 4294967295ULL
-#define FP64 18446744073709551615ULL
+#define MAX32 4294967295ULL
+#define MAX64 18446744073709551615ULL
/* sampletime in seconds for live traffic */
/* don't use values below 2 */
data.month[0].month=current;
}
- data.btime=FP32;
+ data.btime=MAX32;
}
int writedb(const char *iface, const char *dirname, int newdb)
/* set some defaults */
rxtotal=txtotal=rxptotal=txptotal=rxpmax=txpmax=0;
- rxpmin=txpmin=rxmin=txmin=FP64;
+ rxpmin=txpmin=rxmin=txmin=MAX64;
rxmax=txmax=0;
timespent = (uint64_t)time(NULL);
a = 1;
b = 0;
- ck_assert(countercalc(&a, &b)==(FP32-1));
+ ck_assert(countercalc(&a, &b)==(MAX32-1));
}
END_TEST
{
uint64_t a, b;
- a = FP32+1;
+ a = MAX32+1;
b = 0;
- ck_assert(countercalc(&a, &b)==(FP64-FP32-1));
+ ck_assert(countercalc(&a, &b)==(MAX64-MAX32-1));
}
END_TEST