always compile the rfid_hexdump() function, since DEBUG_LIBRFID might be defined...
[librfid] / utils / common.c
index 2966ab4..12c3bd4 100644 (file)
@@ -3,7 +3,10 @@
 #include <stdlib.h>
 #include <string.h>
 #include <errno.h>
+
+#ifndef __MINGW32__
 #include <libgen.h>
+#endif
 
 #include <librfid/rfid.h>
 #include <librfid/rfid_scan.h>
@@ -15,6 +18,7 @@
 #include <librfid/rfid_protocol_mifare_ul.h>
 
 #include "librfid-tool.h"
+#include "common.h"
 
 const char *
 hexdump(const void *data, unsigned int len)
@@ -51,10 +55,8 @@ hexread(unsigned char *result, const unsigned char *in, unsigned int len)
        unsigned char *res = result;
 
        for (pos = in; pos-in <= len-2; pos+=2) {
-               if (*pos == ':') {
+               if (*pos == ':')
                        pos++;
-                       continue;
-               }
                dig1 = *pos;
                dig2 = *(pos+1);
 
@@ -85,7 +87,6 @@ int reader_init(void)
 
 int l2_init(int layer2)
 {
-       unsigned char buf[0x3f];
        int rc;
 
        printf("opening layer2 handle\n");