diff options
author | Pali Rohár <pali.rohar@gmail.com> | 2013-04-07 14:38:41 +0200 |
---|---|---|
committer | Pali Rohár <pali.rohar@gmail.com> | 2013-04-07 14:38:41 +0200 |
commit | 848e3fe06c3cddef5e527067c89e135ae630ee0c (patch) | |
tree | 305446b7d209e9cb70e10c9cc2b1f0e306f28bd7 | |
parent | eb97fad2a7c4264dc261174fb8423f4c6fa5709d (diff) | |
download | 0xFFFF-848e3fe06c3cddef5e527067c89e135ae630ee0c.tar.bz2 |
device: Remove dependency on log10, max value of uint16_t is 5
-rw-r--r-- | src/device.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/device.c b/src/device.c index d4a80d7..2ac5cb6 100644 --- a/src/device.c +++ b/src/device.c @@ -20,7 +20,6 @@ #include <stdlib.h> #include <stdint.h> #include <string.h> -#include <math.h> #include "global.h" @@ -143,7 +142,7 @@ char * hwrevs_alloc_to_string(const int16_t * hwrevs) { int len = 0; for ( i = 0; hwrevs[i] != -1; ++i ) - len += log10(hwrevs[i]+1)+2; + len += 7; ret = calloc(1, len+1); if ( ! ret ) |