]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - armsrc/util.c
Merge branch 'master' of https://github.com/Proxmark/proxmark3
[proxmark3-svn] / armsrc / util.c
index 889319279750290a9d3627cc177b49eb4e9025bf..c3d4d2c621d3d3252dd06415de5f6084204af37e 100644 (file)
@@ -8,7 +8,7 @@
 // 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"
@@ -35,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) {
Impressum, Datenschutz