sdm: Use unique ifstream per hwr debugfs node
clang8 builds seem to not like the idea of closing and opening a new
file with the same ifstream object in this code, it causes null pointer
deref on both rdbuf and getchar. Use unique objects as a fix.
Strangely, a standalone program was tested to do this same sequence of
open/close/read on text files and compiled with all clang++ versions from
$ANDROID_BUILD_TOP/prebuilts/ and worked as expected...
Either way, a fix is needed.
Change-Id: I45ab7b8577d73e44bde67cbb7fcfc2ddaa2dec6f
CRs-Fixed: 2426167
1 file changed