]> err.no Git - linux-2.6/blobdiff - include/net/pkt_sched.h
Automerge with /usr/src/ntfs-2.6.git.
[linux-2.6] / include / net / pkt_sched.h
index 87496e3aa3302a4e8dc42f5c4f53a22f550d5008..fcb05a387dbee560d6a0f20b6e8c3c4f1b2d93f1 100644 (file)
@@ -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; \
 })