The variable cur could be null, so if we use do while will cause a segment fault Change-Id: I19ec26e88948a0c3fd957e03e717b68750f40c62 Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Iba90db6d8853dde972b4eec2c35eb44eeddae780 Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>