Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/ic Force 64bit arithmetic for timeout computation; a...



details:   https://anonhg.NetBSD.org/src/rev/7c3c20099916
branches:  trunk
changeset: 495427:7c3c20099916
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Thu Jul 27 21:28:17 2000 +0000

description:
Force 64bit arithmetic for timeout computation; a 32bit int opverflows for
large timeouts. Should fix PR kern/10575.

diffstat:

 sys/dev/ic/siop.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (21 lines):

diff -r 2537a8487c9d -r 7c3c20099916 sys/dev/ic/siop.c
--- a/sys/dev/ic/siop.c Thu Jul 27 21:06:53 2000 +0000
+++ b/sys/dev/ic/siop.c Thu Jul 27 21:28:17 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: siop.c,v 1.26 2000/07/24 15:15:00 bouyer Exp $ */
+/*     $NetBSD: siop.c,v 1.27 2000/07/27 21:28:17 bouyer Exp $ */
 
 /*
  * Copyright (c) 2000 Manuel Bouyer.
@@ -1363,9 +1363,9 @@
                                        if ((siop_cmd->xs->xs_control &
                                            XS_CTL_POLL) == 0) {
                                                /* start exire timer */
-                                               timeout =
+                                               timeout = (u_int64_t)
                                                    siop_cmd->xs->timeout *
-                                                   hz / 1000;
+                                                   (u_int64_t)hz / 1000;
                                                if (timeout == 0)
                                                        timeout = 1;
                                                callout_reset(



Home | Main Index | Thread Index | Old Index