db/simple/Save: initialize array without memset()
This commit is contained in:
parent
046a385070
commit
ad854e9867
|
@ -57,15 +57,13 @@ db_load_internal(LineReader &file, Directory &music_root)
|
||||||
char *line;
|
char *line;
|
||||||
unsigned format = 0;
|
unsigned format = 0;
|
||||||
bool found_charset = false, found_version = false;
|
bool found_charset = false, found_version = false;
|
||||||
bool tags[TAG_NUM_OF_ITEM_TYPES];
|
bool tags[TAG_NUM_OF_ITEM_TYPES]{};
|
||||||
|
|
||||||
/* get initial info */
|
/* get initial info */
|
||||||
line = file.ReadLine();
|
line = file.ReadLine();
|
||||||
if (line == nullptr || strcmp(DIRECTORY_INFO_BEGIN, line) != 0)
|
if (line == nullptr || strcmp(DIRECTORY_INFO_BEGIN, line) != 0)
|
||||||
throw std::runtime_error("Database corrupted");
|
throw std::runtime_error("Database corrupted");
|
||||||
|
|
||||||
memset(tags, false, sizeof(tags));
|
|
||||||
|
|
||||||
while ((line = file.ReadLine()) != nullptr &&
|
while ((line = file.ReadLine()) != nullptr &&
|
||||||
strcmp(line, DIRECTORY_INFO_END) != 0) {
|
strcmp(line, DIRECTORY_INFO_END) != 0) {
|
||||||
const char *p;
|
const char *p;
|
||||||
|
|
Loading…
Reference in New Issue