[PATCH 2/6] Cochran code: - fixed bug where last dive was not completed downloaded resulting in a bad dive profile - fixed bug where malloc result wasn't verified - removed unnecesary cast - minor code formatting and comment changes.