linuxNodeInfoCPUPopulate: avoid used-uninitialized via a test
* tests/nodeinfotest.c (linuxTestCompareFiles): Don't use nodeinfo->member uninitialized. linuxNodeInfoCPUPopulate requires that some of its nodeinfo members (including threads) be initialized upon input. The nodeinfotest.c program lacked the initialization, while the only other use (nodeGetInfo) did perform it. It's not trivial to move the initialization into the function, since nodeGetInfo sets at least one member after clearing the buffer but before calling linuxNodeInfoCPUPopulate.
Showing
想要评论请 注册 或 登录