aboutsummaryrefslogtreecommitdiff
path: root/include/net/pkt_sched.h
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2006-08-01 10:37:25 +1000
committerPaul Mackerras <paulus@samba.org>2006-08-01 10:37:25 +1000
commit57cad8084e0837e0f2c97da789ec9b3f36809be9 (patch)
treee9c790afb4286f78cb08d9664f58baa7e876fe55 /include/net/pkt_sched.h
parentcb18bd40030c879cd93fef02fd579f74dbab473d (diff)
parent49b1e3ea19b1c95c2f012b8331ffb3b169e4c042 (diff)
Merge branch 'merge'
Diffstat (limited to 'include/net/pkt_sched.h')
-rw-r--r--include/net/pkt_sched.h18
1 files changed, 6 insertions, 12 deletions
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h
index 1925c65e617..f6afee73235 100644
--- a/include/net/pkt_sched.h
+++ b/include/net/pkt_sched.h
@@ -169,23 +169,17 @@ psched_tod_diff(int delta_sec, int bound)
#define PSCHED_TADD2(tv, delta, tv_res) \
({ \
- int __delta = (delta); \
- (tv_res) = (tv); \
- while(__delta >= USEC_PER_SEC){ \
- (tv_res).tv_sec++; \
- __delta -= USEC_PER_SEC; \
- } \
+ int __delta = (tv).tv_usec + (delta); \
+ (tv_res).tv_sec = (tv).tv_sec; \
+ while (__delta >= USEC_PER_SEC) { (tv_res).tv_sec++; __delta -= USEC_PER_SEC; } \
(tv_res).tv_usec = __delta; \
})
#define PSCHED_TADD(tv, delta) \
({ \
- int __delta = (delta); \
- while(__delta >= USEC_PER_SEC){ \
- (tv).tv_sec++; \
- __delta -= USEC_PER_SEC; \
- } \
- (tv).tv_usec = __delta; \
+ (tv).tv_usec += (delta); \
+ while ((tv).tv_usec >= USEC_PER_SEC) { (tv).tv_sec++; \
+ (tv).tv_usec -= USEC_PER_SEC; } \
})
/* Set/check that time is in the "past perfect";