Fix port malloc for device value update
Add safety case for enumeration in sensor value update
Add semi-colons