[FREELDR] Pre-initialize the INI section list, improve loops over sections and items.
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Sat, 9 Mar 2024 10:45:27 +0000 (11:45 +0100)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Mon, 11 Mar 2024 21:37:33 +0000 (22:37 +0100)
commitb790cfcef127cc619024630aa9d74b23eece3899
tree2b4df1e0ece1b3bf9ee02a25dee138288564d447
parentc8c32db8c594c4adc81446b449c3989a81e40487
[FREELDR] Pre-initialize the INI section list, improve loops over sections and items.

Avoids dereferencing list entries to sections/items when these lists are empty.

IniParseFile(): Emit an error to the debug log when a candidate setting
is outside a section and skip it, instead of popping up an error on the UI.
boot/freeldr/freeldr/lib/inifile/inifile.c
boot/freeldr/freeldr/lib/inifile/parse.c