]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/util.c
Merge pull request #969 from pwpiwi/gcc10_fixes
[proxmark3-svn] / client / util.c
index 3b299c9a9854348678606402f23ccba707711216..2058044802f6e19e50086bec871db7b56513c0e0 100644 (file)
@@ -11,6 +11,7 @@
 #include "util.h"
 
 #include <stdint.h>
+#include <inttypes.h>
 #include <string.h>
 #include <ctype.h>
 #include <stdlib.h>
@@ -49,7 +50,7 @@ int ukbhit(void)
        error += tcsetattr(STDIN_FILENO, TCSANOW, &Otty);             // reset attributes
   }
 
-  return ( error == 0 ? cnt : -1 );
+  return cnt;
 }
 
 char getch(void)
@@ -572,7 +573,7 @@ int param_gethex_to_eol(const char *line, int paramnum, uint8_t * data, int maxd
                }
 
                if (strlen(buf) >= 2) {
-                       sscanf(buf, "%x", &temp);
+                       sscanf(buf, "%" SCNx32, &temp);
                        data[*datalen] = (uint8_t)(temp & 0xff);
                        *buf = 0;
                        (*datalen)++;
Impressum, Datenschutz