Added extra braces to DELTA_TIMEVAL macro.
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@501 e3e1d417-86f3-4887-817a-d78f3d33393fpull/27/merge
parent
2e9f63ca15
commit
172c2fb659
2
src/zm.h
2
src/zm.h
|
@ -40,7 +40,7 @@ struct DeltaTimeval
|
|||
// for frames it will only usually be a fraction of a second or so
|
||||
#define DELTA_TIMEVAL( result, time1, time2 ) \
|
||||
{ \
|
||||
int delta_usec = ((time1.tv_sec-time2.tv_sec)*1000000)+(time1.tv_usec-time2.tv_usec); \
|
||||
int delta_usec = (((time1).tv_sec-(time2).tv_sec)*1000000)+((time1).tv_usec-(time2).tv_usec); \
|
||||
result.positive = (delta_usec>=0); \
|
||||
delta_usec = abs(delta_usec); \
|
||||
result.tv_sec = delta_usec/1000000; \
|
||||
|
|
Loading…
Reference in New Issue