This commit is contained in:
iceman1001
2021-04-08 10:44:31 +02:00
parent 31c5722ac0
commit 27184d7f5b
21 changed files with 334 additions and 334 deletions

View File

@@ -440,15 +440,15 @@ static void showSavePathState(savePaths_t path_index, prefShowOpt_t opt) {
if (path_index < spItemCount) {
if ((session.defaultPaths[path_index] == NULL) || (strcmp(session.defaultPaths[path_index], "") == 0)) {
PrintAndLogEx(INFO, " %s %s "_WHITE_("not set"),
prefShowMsg(opt),
s
);
prefShowMsg(opt),
s
);
} else {
PrintAndLogEx(INFO, " %s %s "_GREEN_("%s"),
prefShowMsg(opt),
s,
session.defaultPaths[path_index]
);
prefShowMsg(opt),
s,
session.defaultPaths[path_index]
);
}
}
}

View File

@@ -521,7 +521,7 @@ static void set_my_user_directory(void) {
char *cwd_buffer = (char *)calloc(pathLen, sizeof(uint8_t));
if (cwd_buffer == NULL) {
PrintAndLogEx(WARNING, "failed to allocate memory");
return;
return;
}
while (GetCurrentDir(cwd_buffer, pathLen) == NULL) {

View File

@@ -1281,7 +1281,7 @@ static int l_cwd(lua_State *L) {
uint16_t path_len = FILENAME_MAX; // should be a good starting point
char *cwd = (char *)calloc(path_len, sizeof(uint8_t));
if (cwd == NULL) {
return returnToLuaWithError(L, "Failed to allocate memory");
return returnToLuaWithError(L, "Failed to allocate memory");
}
while (GetCurrentDir(cwd, path_len) == NULL) {

View File

@@ -299,7 +299,7 @@ char *sprint_bin_break(const uint8_t *data, const size_t len, const uint8_t brea
// manchester wrong bit marker
if (c == 7)
c = '.';
else
else
c += '0';
*(tmp++) = c;
@@ -308,7 +308,7 @@ char *sprint_bin_break(const uint8_t *data, const size_t len, const uint8_t brea
if (breaks) {
if (((i + 1) % breaks) == 0) {
*(tmp++) = '\n';
*(tmp++) = '\n';
}
}
}
@@ -1026,7 +1026,7 @@ int hexstring_to_u96(uint32_t *hi2, uint32_t *hi, uint32_t *lo, const char *str)
int binstring_to_u96(uint32_t *hi2, uint32_t *hi, uint32_t *lo, const char *str) {
uint32_t n = 0, i = 0;
for(;;) {
for (;;) {
int res = sscanf(&str[i], "%1u", &n);
if ((res != 1) || (n > 1))
@@ -1050,7 +1050,7 @@ int binstring_to_u96(uint32_t *hi2, uint32_t *hi, uint32_t *lo, const char *str)
*/
int binarray_to_u96(uint32_t *hi2, uint32_t *hi, uint32_t *lo, uint8_t *arr, int arrlen) {
int i = 0;
for(; i < arrlen; i++) {
for (; i < arrlen; i++) {
uint8_t n = arr[i];
if (n > 1)
break;