X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/1eb874ee3f7690cc92a720c0636fbe100e82b1e5..4ecde0e1ff60d5e3d217dc1e5ca12c78864804cc:/armsrc/util.c diff --git a/armsrc/util.c b/armsrc/util.c index 674f1b91..c3d4d2c6 100644 --- a/armsrc/util.c +++ b/armsrc/util.c @@ -8,10 +8,11 @@ // Utility functions used in many places, not specific to any piece of code. //----------------------------------------------------------------------------- -#include "proxmark3.h" +#include "../include/proxmark3.h" #include "util.h" #include "string.h" #include "apps.h" +#include "BigBuf.h" @@ -34,7 +35,7 @@ void print_result(char *name, uint8_t *buf, size_t len) { } size_t nbytes(size_t nbits) { - return (nbits/8)+((nbits%8)>0); + return (nbits >> 3)+((nbits % 8) > 0); } uint32_t SwapBits(uint32_t value, int nrbits) { @@ -428,4 +429,3 @@ uint32_t RAMFUNC GetCountSspClk(){ } } -