summaryrefslogtreecommitdiffstats
path: root/include/net/pkt_sched.h
diff options
context:
space:
mode:
authorTony Luck <tony.luck@intel.com>2005-05-17 15:53:14 -0700
committerTony Luck <tony.luck@intel.com>2005-05-17 15:53:14 -0700
commit325a479c4c110db278ef3361460a48c4093252cc (patch)
treebcfbf4d0647d9442045639a5c19da59d55190e81 /include/net/pkt_sched.h
parentebcc80c1b6629a445f7471cc1ddb48faf8a84e70 (diff)
parent7f9eaedf894dbaa08c157832e9a6c9c03ffed1ed (diff)
downloadkernel-crypto-325a479c4c110db278ef3361460a48c4093252cc.tar.gz
kernel-crypto-325a479c4c110db278ef3361460a48c4093252cc.tar.xz
kernel-crypto-325a479c4c110db278ef3361460a48c4093252cc.zip
Merge with temp tree to get David's gdb inferior calls patch
Diffstat (limited to 'include/net/pkt_sched.h')
-rw-r--r--include/net/pkt_sched.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h
index 87496e3aa33..fcb05a387db 100644
--- a/include/net/pkt_sched.h
+++ b/include/net/pkt_sched.h
@@ -140,7 +140,7 @@ psched_tod_diff(int delta_sec, int bound)
if (bound <= 1000000 || delta_sec > (0x7FFFFFFF/1000000)-1)
return bound;
delta = delta_sec * 1000000;
- if (delta > bound)
+ if (delta > bound || delta < 0)
delta = bound;
return delta;
}
@@ -156,7 +156,9 @@ psched_tod_diff(int delta_sec, int bound)
__delta += 1000000; \
case 1: \
__delta += 1000000; \
- case 0: ; \
+ case 0: \
+ if (__delta > bound || __delta < 0) \
+ __delta = bound; \
} \
__delta; \
})