summaryrefslogtreecommitdiff
path: root/libgpsd_core.c
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2010-12-11 13:25:09 -0800
committerGary E. Miller <gem@rellim.com>2010-12-11 13:25:09 -0800
commitd18b67f0a2dfa87015733f1f754afda65747a7a1 (patch)
treeff8fb8b771a3d59db916a4adcfeb93f6e1ba4159 /libgpsd_core.c
parent655a9784c9adc42ec6a153e8ebeb81984ed8f187 (diff)
downloadgpsd-d18b67f0a2dfa87015733f1f754afda65747a7a1.tar.gz
Fix stupid error in timeval/timespec rounding macros.
Diffstat (limited to 'libgpsd_core.c')
-rw-r--r--libgpsd_core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libgpsd_core.c b/libgpsd_core.c
index 46884c57..9997de09 100644
--- a/libgpsd_core.c
+++ b/libgpsd_core.c
@@ -55,7 +55,7 @@
/* normalize a timespec */
#define TS_NORM(ts) \
do { \
- if ( 1000000000 >= (ts)->tv_nsec ) { \
+ if ( 1000000000 <= (ts)->tv_nsec ) { \
(ts)->tv_nsec -= 1000000000; \
(ts)->tv_sec++; \
} else if ( 0 > (ts)->tv_nsec ) { \
@@ -67,7 +67,7 @@
/* normalize a timeval */
#define TV_NORM(tv) \
do { \
- if ( 1000000 >= (tv)->tv_usec ) { \
+ if ( 1000000 <= (tv)->tv_usec ) { \
(tv)->tv_usec -= 1000000; \
(tv)->tv_sec++; \
} else if ( 0 > (tv)->tv_usec ) { \