]> git.zerfleddert.de Git - proxmark3-svn/commitdiff
Merge pull request #402 from pwpiwi/env_flags
authorIceman <iceman@iuse.se>
Fri, 29 Sep 2017 10:01:54 +0000 (12:01 +0200)
committerGitHub <noreply@github.com>
Fri, 29 Sep 2017 10:01:54 +0000 (12:01 +0200)
Don't ignore environment variables CFLAGS and LDFLAGS

client/cmdhfmf.c
client/cmdlfem4x.c
client/hardnested/hardnested_bf_core.c
client/loclass/cipher.c
client/util_posix.c

index 5a9896debb171cc8b957cf3091fbaeba361eb197..aafbce2afa12990873e7422daf4fc65f56ebc073 100644 (file)
@@ -1905,7 +1905,7 @@ int CmdHF14AMfCWipe(const char *Cmd)
        }\r
 \r
        if (!wipeCard && !fillCard) \r
-               wipeCard = TRUE;\r
+               wipeCard = true;\r
 \r
        PrintAndLog("--blocks count:%2d wipe:%c fill:%c", numBlocks, (wipeCard)?'y':'n', (fillCard)?'y':'n');\r
 \r
@@ -2193,13 +2193,13 @@ int CmdHF14AMfCSave(const char *Cmd) {
        if (param_getchar(Cmd, 0) == 'h') {\r
                PrintAndLog("It saves `magic Chinese` card dump into the file `filename.eml` or `cardID.eml`");\r
                PrintAndLog("or into emulator memory (option `e`). 4K card: (option `4`)");\r
-               PrintAndLog("Usage:  hf mf esave [file name w/o `.eml`][e][4]");\r
-               PrintAndLog("Sample: hf mf esave ");\r
-               PrintAndLog("        hf mf esave filename");\r
-               PrintAndLog("        hf mf esave e");\r
-               PrintAndLog("        hf mf esave 4");\r
-               PrintAndLog("        hf mf esave filename 4");\r
-               PrintAndLog("        hf mf esave e 4");\r
+               PrintAndLog("Usage:  hf mf csave [file name w/o `.eml`][e][4]");\r
+               PrintAndLog("Sample: hf mf csave ");\r
+               PrintAndLog("        hf mf csave filename");\r
+               PrintAndLog("        hf mf csave e");\r
+               PrintAndLog("        hf mf csave 4");\r
+               PrintAndLog("        hf mf csave filename 4");\r
+               PrintAndLog("        hf mf csave e 4");\r
                return 0;\r
        }\r
 \r
index 013c2f3fb427be478c318ff365b44d9e4f45692f..f5dfee35556134133479f0bb49328db686a983de 100644 (file)
@@ -606,7 +606,7 @@ int EM4x50Read(const char *Cmd, bool verbose)
        char tmp2[20];
        int phaseoff;
        high = low = 0;
-       memset(tmpbuff, 0, MAX_GRAPH_TRACE_LEN / 64);
+       memset(tmpbuff, 0, sizeof(tmpbuff));
 
        // get user entry if any
        sscanf(Cmd, "%i %i", &clk, &invert);
index 5e81c2ba80c157ffac8492426d4040133c2c0a43..3c0c044ff5b7932ffb0418502abe0d16634f153b 100644 (file)
@@ -342,7 +342,7 @@ const uint64_t CRACK_STATES_BITSLICED(uint32_t cuid, uint8_t *best_first_bytes,
                        // }
 #endif
             // add the even state bits
-                       const bitslice_t const *restrict bitsliced_even_state = bitsliced_even_states[block_idx];
+                       const bitslice_t *restrict bitsliced_even_state = bitsliced_even_states[block_idx];
                        for(uint32_t state_idx = 1; state_idx < STATE_SIZE; state_idx += 2) {
                                state_p[state_idx] = bitsliced_even_state[state_idx/2];
                        }
index a701da31934164630e4df7f80605149a449c3dbd..57bc831fe1f97dda82c3c8fa9a940f77721ec0ea 100644 (file)
@@ -114,9 +114,9 @@ uint8_t _select(bool x, bool y, uint8_t r)
        bool r6 = r >> 1 & 0x1;
        bool r7 = r & 0x1;
 
-       bool z0 = (r0 & r2) ^ (r1 & ~r3) ^ (r2 | r4);
+       bool z0 = (r0 & r2) ^ (r1 & !r3) ^ (r2 | r4);
        bool z1 = (r0 | r2) ^ ( r5 | r7) ^ r1 ^ r6 ^ x ^ y;
-       bool z2 = (r3 & ~r5) ^ (r4 & r6 ) ^ r7 ^ x;
+       bool z2 = (r3 & !r5) ^ (r4 & r6 ) ^ r7 ^ x;
 
        // The three bitz z0.. z1 are packed into a uint8_t:
        // 00000ZZZ
index dd3d714c52654d4b8114646de7e1b8f19920dee2..8f3ed46b6a45c827950dfb377745965ade89e3c7 100644 (file)
@@ -35,7 +35,7 @@ void msleep(uint32_t n) {
 }
 #endif // _WIN32
 
-#ifdef __MACH__
+#ifdef __APPLE__
 
        #define CLOCK_MONOTONIC (1)
        #define CLOCK_REALTIME (2)
@@ -63,20 +63,18 @@ void msleep(uint32_t n) {
 
                } else if (clk_id == CLOCK_MONOTONIC) {
                        static uint64_t clock_start_time = 0;
-                       static mach_timebase_info_data_t timebase_ifo = {0, 0};
+                       static mach_timebase_info_data_t timebase_info = {0, 0};
 
                        uint64_t now = mach_absolute_time();
 
                        if (clock_start_time == 0) {
-                               //kern_return_t mach_status = mach_timebase_info(&timebase_ifo);
-                               // appease "unused variable" warning for release builds
-                               //(void)mach_status;
+                               mach_timebase_info(&timebase_info);
                                clock_start_time = now;
                        }
 
                        now = (uint64_t)((double)(now - clock_start_time)
-                                        * (double)timebase_ifo.numer
-                                        / (double)timebase_ifo.denom);
+                                        * (double)timebase_info.numer
+                                        / (double)timebase_info.denom);
 
                        t->tv_sec = now / 1000000000;
                        t->tv_nsec = now % 1000000000;
Impressum, Datenschutz