mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-07-16 10:03:04 -07:00
cppcheck fixes const
This commit is contained in:
parent
0d8971916f
commit
a8ccba77d6
7 changed files with 35 additions and 34 deletions
|
@ -1263,20 +1263,18 @@ int loadFileJSONroot(const char *preferredName, void **proot, bool verbose) {
|
|||
if (root == NULL) {
|
||||
PrintAndLogEx(ERR, "ERROR: json " _YELLOW_("%s") " error on line %d: %s", preferredName, error.line, error.text);
|
||||
retval = PM3_ESOFT;
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (!json_is_object(root)) {
|
||||
if (json_is_object(root) == false) {
|
||||
PrintAndLogEx(ERR, "ERROR: Invalid json " _YELLOW_("%s") " format. root must be an object.", preferredName);
|
||||
retval = PM3_ESOFT;
|
||||
goto out;
|
||||
}
|
||||
|
||||
*proot = root;
|
||||
return PM3_SUCCESS;
|
||||
if (retval == PM3_ESOFT)
|
||||
json_decref(root);
|
||||
else
|
||||
*proot = root;
|
||||
|
||||
out:
|
||||
json_decref(root);
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue