cppchecker ,, silence a warning

This commit is contained in:
iceman1001 committed 2021-01-28 14:32:57 +01:00
1 parent 6633214957
commit 2c73337bde
1 file changed
+6 -1
+6 -1
View File
@@ -834,7 +834,7 @@ static int setCmdSavePaths(const char *Cmd) {
CLIParserFree(ctx);
if (deflen == 0 && dulen == 0 && tlen == 0) {
PrintAndLogEx(FAILED, "Must give atleast one path");
PrintAndLogEx(FAILED, "Must give at least one path");
return PM3_EINVARG;
}
@@ -853,6 +853,11 @@ static int setCmdSavePaths(const char *Cmd) {
path = trace_path;
}
if (path == NULL) {
PrintAndLogEx(FAILED, "Must give at least one path");
return PM3_EINVARG;
}
// remove trailing slash.
size_t nplen = strlen(path);
if ((path[nplen - 1] == '/') || (path[nplen - 1] == '\\')) {