Re: [PATCH] spring: Avoid looping if time appears to be going backwards

2012-08-03 Thread Kristian Høgsberg
On Fri, Aug 03, 2012 at 05:02:04PM +0100, Rob Bradford wrote: > From: Rob Bradford > > Since the time values are unsigned integers we can check whether the msec is > smaller than spring->timestamp by checking if the subtraction overflows into a > value greater than half the maximum unsigned integ

[PATCH] spring: Avoid looping if time appears to be going backwards

2012-08-03 Thread Rob Bradford
From: Rob Bradford Since the time values are unsigned integers we can check whether the msec is smaller than spring->timestamp by checking if the subtraction overflows into a value greater than half the maximum unsigned integer range (ie. top bit set) --- src/util.c | 8 1 file changed,