Fix cpp style cast and variable name
am: 6a70875ba8

Change-Id: Ib0e80bfa95dbe390db5b7c66d7cf9eba204b30d1