Lib: update m-lib to latest release. Update m-lib usage across project. (#818)
This commit is contained in:
@@ -114,7 +114,7 @@ bool file_worker_read(FileWorker* file_worker, void* buffer, uint16_t bytes_to_r
|
||||
}
|
||||
|
||||
bool file_worker_read_until(FileWorker* file_worker, string_t str_result, char separator) {
|
||||
string_clean(str_result);
|
||||
string_reset(str_result);
|
||||
const uint8_t buffer_size = 32;
|
||||
uint8_t buffer[buffer_size];
|
||||
|
||||
@@ -328,7 +328,7 @@ bool file_worker_read_until_buffered(
|
||||
// fs_api->file.read now supports up to 512 bytes reading at a time
|
||||
furi_assert(file_buf_size <= 512);
|
||||
|
||||
string_clean(str_result);
|
||||
string_reset(str_result);
|
||||
size_t newline_index = 0;
|
||||
bool found_eol = false;
|
||||
bool max_length_exceeded = false;
|
||||
@@ -367,7 +367,7 @@ bool file_worker_read_until_buffered(
|
||||
file_worker->file, &file_buf[*file_buf_cnt], file_buf_size - *file_buf_cnt);
|
||||
if(storage_file_get_error(file_worker->file) != FSE_OK) {
|
||||
file_worker_show_error_internal(file_worker, "Cannot read\nfile");
|
||||
string_clean(str_result);
|
||||
string_reset(str_result);
|
||||
*file_buf_cnt = 0;
|
||||
break;
|
||||
}
|
||||
@@ -376,7 +376,7 @@ bool file_worker_read_until_buffered(
|
||||
}
|
||||
}
|
||||
|
||||
if(max_length_exceeded) string_clean(str_result);
|
||||
if(max_length_exceeded) string_reset(str_result);
|
||||
|
||||
return string_size(str_result) || *file_buf_cnt;
|
||||
}
|
||||
|
@@ -38,7 +38,7 @@ bool file_helper_write_hex(File* file, const uint8_t* data, const uint16_t data_
|
||||
}
|
||||
|
||||
bool file_helper_read_line(File* file, string_t str_result) {
|
||||
string_clean(str_result);
|
||||
string_reset(str_result);
|
||||
const uint8_t buffer_size = 32;
|
||||
uint8_t buffer[buffer_size];
|
||||
|
||||
@@ -109,7 +109,7 @@ bool file_helper_seek_to_next_line(File* file) {
|
||||
}
|
||||
|
||||
bool file_helper_read_value(File* file, string_t value, bool* last) {
|
||||
string_clean(value);
|
||||
string_reset(value);
|
||||
const uint8_t buffer_size = 32;
|
||||
uint8_t buffer[buffer_size];
|
||||
bool result = false;
|
||||
|
@@ -12,7 +12,7 @@ const char* flipper_file_scratchpad = "/any/.scratch.pad";
|
||||
#endif
|
||||
|
||||
bool flipper_file_read_valid_key(File* file, string_t key) {
|
||||
string_clean(key);
|
||||
string_reset(key);
|
||||
bool found = false;
|
||||
bool error = false;
|
||||
const uint8_t buffer_size = 32;
|
||||
@@ -27,7 +27,7 @@ bool flipper_file_read_valid_key(File* file, string_t key) {
|
||||
for(uint16_t i = 0; i < bytes_were_read; i++) {
|
||||
if(buffer[i] == flipper_file_eoln) {
|
||||
// EOL found, clean data, start accumulating data and set the new_line flag
|
||||
string_clean(key);
|
||||
string_reset(key);
|
||||
accumulate = true;
|
||||
new_line = true;
|
||||
} else if(buffer[i] == flipper_file_eolr) {
|
||||
@@ -43,7 +43,7 @@ bool flipper_file_read_valid_key(File* file, string_t key) {
|
||||
// this can only be if we have previously found some kind of key, so
|
||||
// clear the data, set the flag that we no longer want to accumulate data
|
||||
// and reset the new_line flag
|
||||
string_clean(key);
|
||||
string_reset(key);
|
||||
accumulate = false;
|
||||
new_line = false;
|
||||
} else {
|
||||
|
2
lib/mlib
2
lib/mlib
Submodule lib/mlib updated: 3c83e4088c...62c8ac3e5d
Reference in New Issue
Block a user