get rid of math.h )

This commit is contained in:
merlokk 2019-01-03 21:00:07 +02:00
parent b5c2ccb78f
commit a86c6fa1a8

View file

@ -25,7 +25,6 @@
#include <stdint.h>
#include <stddef.h>
#include <stdlib.h>
#include <math.h>
#define TLV_TAG_CLASS_MASK 0xc0
#define TLV_TAG_COMPLEX 0x20
@ -565,7 +564,7 @@ bool tlv_get_int(const struct tlv *etlv, int *value)
{
for (int i = 0; i < etlv->len; i++)
{
*value += etlv->value[i] * pow(0x100, i);
*value += etlv->value[i] * (1 << (i * 8));
}
return true;
}