[PATCH] Clean up Divesoft Freedome time parsing

Anton Lundin glance at acc.umu.se
Sat Oct 3 08:06:30 PDT 2015


On 03 October, 2015 - Linus Torvalds wrote:

> 
> From: Linus Torvalds <torvalds at linux-foundation.org>
> Date: Sat, 3 Oct 2015 10:29:40 -0400
> Subject: [PATCH] Clean up Divesoft Freedome time parsing
> 
> So Anton Lundin says that the 32-bit timestamp for the Divesoft Freedom
> is indeed a signed offset from Jan 1, 2000.
> 
> This does that, but also extracts the whole thing into a helper function
> and makes sure that there are no overflows at any point by using
> "timestamp_t" in the whole series, and all the operations are "obviously
> safe" in their types (ie no "unsigned char gets widened to 'int' and
> then we shift it left by 24 bits").
> 

I looked at the wrong typedef and its a uint32_t. Sorry for the mess.


//Anton


-- 
Anton Lundin	+46702-161604


More information about the subsurface mailing list