coverity fixes

This commit is contained in:
iceman1001 2023-11-06 22:58:14 +01:00
commit 6653bffe00
2 changed files with 6 additions and 4 deletions

View file

@ -389,8 +389,9 @@ static void printConnSpeed(uint32_t wait) {
Dbprintf(" Time elapsed................... %dms", delta_time); Dbprintf(" Time elapsed................... %dms", delta_time);
Dbprintf(" Bytes transferred.............. %d", bytes_transferred); Dbprintf(" Bytes transferred.............. %d", bytes_transferred);
if (delta_time) {
Dbprintf(" Transfer Speed PM3 -> Client... " _YELLOW_("%llu") " bytes/s", 1000 * (uint64_t)bytes_transferred / delta_time); Dbprintf(" Transfer Speed PM3 -> Client... " _YELLOW_("%llu") " bytes/s", 1000 * (uint64_t)bytes_transferred / delta_time);
} }
/** /**
* Prints runtime information about the PM3. * Prints runtime information about the PM3.

View file

@ -8256,6 +8256,8 @@ static int CmdHF14AGen4ChangePwd(const char *Cmd) {
bool verbose = arg_get_lit(ctx, 3); bool verbose = arg_get_lit(ctx, 3);
CLIParserFree(ctx);
if (pwd_len != 4) { if (pwd_len != 4) {
PrintAndLogEx(FAILED, "Old password must be 4 bytes long, got " _YELLOW_("%u"), pwd_len); PrintAndLogEx(FAILED, "Old password must be 4 bytes long, got " _YELLOW_("%u"), pwd_len);
return PM3_EINVARG; return PM3_EINVARG;
@ -8272,8 +8274,7 @@ static int CmdHF14AGen4ChangePwd(const char *Cmd) {
return res; return res;
} }
PrintAndLogEx(SUCCESS, "Change password done successfully."); PrintAndLogEx(SUCCESS, "Change password ( " _GREEN_("ok") " )");
return PM3_SUCCESS; return PM3_SUCCESS;
} }