mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 21:33:47 -07:00
fix cppchecker, bad boolean compare and unused value
This commit is contained in:
parent
ed87304ca6
commit
ec46f55821
1 changed files with 6 additions and 2 deletions
|
@ -195,7 +195,7 @@ static int CmdHFFidoRegister(const char *cmd) {
|
|||
return PM3_EINVARG;
|
||||
}
|
||||
}
|
||||
if (cphex & !cpplain) {
|
||||
if (cphex && cpplain == false) {
|
||||
chlen = sizeof(cdata);
|
||||
CLIGetHexWithReturn(ctx, 7, cdata, &chlen);
|
||||
if (chlen && chlen != 32) {
|
||||
|
@ -219,7 +219,7 @@ static int CmdHFFidoRegister(const char *cmd) {
|
|||
return PM3_EINVARG;
|
||||
}
|
||||
}
|
||||
if (aphex & !applain) {
|
||||
if (aphex && applain == false) {
|
||||
applen = sizeof(adata);
|
||||
CLIGetHexWithReturn(ctx, 8, adata, &applen);
|
||||
if (applen && applen != 32) {
|
||||
|
@ -380,6 +380,7 @@ static int CmdHFFidoRegister(const char *cmd) {
|
|||
|
||||
//sprintf(filename, "hf-fido2-params");
|
||||
res = saveFileJSONroot(filename, root, JSON_INDENT(2), verbose);
|
||||
(void)res;
|
||||
}
|
||||
json_decref(root);
|
||||
return PM3_SUCCESS;
|
||||
|
@ -635,6 +636,7 @@ static int CmdHFFidoAuthenticate(const char *cmd) {
|
|||
|
||||
sprintf(filename, "hf-fido2-params");
|
||||
res = saveFileJSONroot(filename, root, JSON_INDENT(2), verbose);
|
||||
(void)res;
|
||||
}
|
||||
json_decref(root);
|
||||
return PM3_ESOFT;
|
||||
|
@ -754,6 +756,7 @@ static int CmdHFFido2MakeCredential(const char *cmd) {
|
|||
// new file name..
|
||||
sprintf(filename, "hf-fido2");
|
||||
res = saveFileJSONroot(filename, root, JSON_INDENT(2), verbose);
|
||||
(void)res;
|
||||
json_decref(root);
|
||||
return res;
|
||||
}
|
||||
|
@ -873,6 +876,7 @@ static int CmdHFFido2GetAssertion(const char *cmd) {
|
|||
// new file name..
|
||||
sprintf(filename, "hf-fido2");
|
||||
res = saveFileJSONroot(filename, root, JSON_INDENT(2), verbose);
|
||||
(void)res;
|
||||
json_decref(root);
|
||||
return res;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue