make style

This commit is contained in:
Philippe Teuwen 2022-02-15 03:14:06 +01:00
commit 2a705d3a44
2 changed files with 5 additions and 5 deletions

View file

@ -1077,7 +1077,7 @@ void pm3_version(bool verbose, bool oneliner) {
if (ptr != NULL) { if (ptr != NULL) {
ptr = strstr(ptr, "\n"); ptr = strstr(ptr, "\n");
if ((ptr != NULL) && (strlen(g_version_information.armsrc) == 9)) { if ((ptr != NULL) && (strlen(g_version_information.armsrc) == 9)) {
if (strncmp(ptr-9, g_version_information.armsrc, 9) != 0) { if (strncmp(ptr - 9, g_version_information.armsrc, 9) != 0) {
armsrc_mismatch = true; armsrc_mismatch = true;
} }
} }

View file

@ -345,8 +345,8 @@ int flash_check(flash_file_t *ctx, const char *name) {
goto fail; goto fail;
} }
for(uint16_t i=0; i<ehdr.e_shnum; i++) { for (uint16_t i = 0; i < ehdr.e_shnum; i++) {
if (strcmp(((char *)shstr) + shdrs[i].sh_name, ".version_information")==0){ if (strcmp(((char *)shstr) + shdrs[i].sh_name, ".version_information") == 0) {
vi = calloc(shdrs[i].sh_size, sizeof(uint8_t)); vi = calloc(shdrs[i].sh_size, sizeof(uint8_t));
if (!vi) { if (!vi) {
PrintAndLogEx(ERR, "Out of memory"); PrintAndLogEx(ERR, "Out of memory");
@ -365,8 +365,8 @@ int flash_check(flash_file_t *ctx, const char *name) {
} }
if (strlen(g_version_information.armsrc) == 9) { if (strlen(g_version_information.armsrc) == 9) {
if (strncmp(vi->armsrc, g_version_information.armsrc, 9) != 0) { if (strncmp(vi->armsrc, g_version_information.armsrc, 9) != 0) {
PrintAndLogEx(WARNING, _RED_("ARM firmware does not match the source at the time the client was compiled")); PrintAndLogEx(WARNING, _RED_("ARM firmware does not match the source at the time the client was compiled"));
PrintAndLogEx(WARNING, "Make sure to flash a correct and up-to-date version"); PrintAndLogEx(WARNING, "Make sure to flash a correct and up-to-date version");
// TODO: prompt user to continue or abort // TODO: prompt user to continue or abort
} }
} }