[FL-2811] Fix PVS-Studio warnings (#2142)
Co-authored-by: あく <alleteam@gmail.com> Co-authored-by: gornekich <n.gorbadey@gmail.com>
This commit is contained in:
@@ -35,7 +35,7 @@ uint8_t dfu_file_validate_headers(File* dfuf, const DfuValidationParams* referen
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(memcmp(dfu_prefix.szSignature, DFU_SIGNATURE, sizeof(dfu_prefix.szSignature))) {
|
||||
if(memcmp(dfu_prefix.szSignature, DFU_SIGNATURE, sizeof(dfu_prefix.szSignature)) != 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@@ -98,7 +98,7 @@ ResourceManifestEntry* resource_manifest_reader_next(ResourceManifestReader* res
|
||||
furi_string_right(resource_manifest->linebuf, offs + 1);
|
||||
|
||||
furi_string_set(resource_manifest->entry.name, resource_manifest->linebuf);
|
||||
} else if(resource_manifest->entry.type == ResourceManifestEntryTypeDirectory) {
|
||||
} else if(resource_manifest->entry.type == ResourceManifestEntryTypeDirectory) { //-V547
|
||||
/* Parse directory entry
|
||||
D:<name> */
|
||||
|
||||
|
@@ -11,7 +11,7 @@
|
||||
#define UPDATE_ROOT_DIR EXT_PATH("update")
|
||||
|
||||
/* Need at least 4 free LFS pages before update */
|
||||
#define UPDATE_MIN_INT_FREE_SPACE 2 * 4 * 1024
|
||||
#define UPDATE_MIN_INT_FREE_SPACE (2 * 4 * 1024)
|
||||
|
||||
static const char* update_prepare_result_descr[] = {
|
||||
[UpdatePrepareResultOK] = "OK",
|
||||
@@ -110,7 +110,7 @@ bool update_operation_get_current_package_manifest_path(Storage* storage, FuriSt
|
||||
}
|
||||
|
||||
static bool update_operation_persist_manifest_path(Storage* storage, const char* manifest_path) {
|
||||
const uint16_t manifest_path_len = strlen(manifest_path);
|
||||
const size_t manifest_path_len = strlen(manifest_path);
|
||||
furi_check(manifest_path && manifest_path_len);
|
||||
bool success = false;
|
||||
File* file = storage_file_alloc(storage);
|
||||
|
Reference in New Issue
Block a user