Manage configuration parser file state using RAII
Static code analysis tools flagged the file state handling as a
potential source of resource loss. Change the code to use RAII to
control the file state automatically. This eliminates the need for
manual intervention, and errors that may arise from manual filehandle
management.
Tested:
Placed debug print statements to confirm the stream is still opened,
and the contents parsed. Removed the print statements following
confirmation.
Change-Id: I6f20117b948673a4babc4b702da741145e57a1c6
Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
1 file changed