Fix up getAttributeFlags() function

In addition to a couple of minor clean-up items, this fixes an issue that can
rarely cause incorrect parsing of attribute flag values, when there is a '|'
character in the few bytes past the end of the attribute value being parsed.

Change-Id: I6050b1c2db60720c7c0ab7df9eba8cfc629b320e
1 file changed