summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2009-09-25 10:59:04 -0400
committerSimo Sorce <ssorce@redhat.com>2009-09-25 11:00:19 -0400
commit76d836570e22c8916a00c723d86eb3be3d706223 (patch)
tree0c75bbabfb0a46acdf50830f8feb85e4f34f97d4
parent014a3a992612269344511181a6701bacc816c934 (diff)
downloadsamba-76d836570e22c8916a00c723d86eb3be3d706223.tar.gz
samba-76d836570e22c8916a00c723d86eb3be3d706223.tar.bz2
samba-76d836570e22c8916a00c723d86eb3be3d706223.zip
Fixing timeval calculation
The code was always doubling microseconds when attempting to round up.
-rw-r--r--lib/tevent/tevent_timed.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/tevent/tevent_timed.c b/lib/tevent/tevent_timed.c
index d75653d847..cc51bf60d5 100644
--- a/lib/tevent/tevent_timed.c
+++ b/lib/tevent/tevent_timed.c
@@ -114,7 +114,7 @@ struct timeval tevent_timeval_add(const struct timeval *tv, uint32_t secs,
tv2.tv_sec += secs;
tv2.tv_usec += usecs;
tv2.tv_sec += tv2.tv_usec / 1000000;
- tv2.tv_usec += tv2.tv_usec % 1000000;
+ tv2.tv_usec = tv2.tv_usec % 1000000;
return tv2;
}