Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/distrib/utils/sysinst avoid another divide-by-zero while com...
details: https://anonhg.NetBSD.org/src/rev/79685e151909
branches: trunk
changeset: 584523:79685e151909
user: chs <chs%NetBSD.org@localhost>
date: Thu Sep 22 15:41:14 2005 +0000
description:
avoid another divide-by-zero while computing geometry.
diffstat:
distrib/utils/sysinst/mbr.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (18 lines):
diff -r 17168aff9cec -r 79685e151909 distrib/utils/sysinst/mbr.c
--- a/distrib/utils/sysinst/mbr.c Thu Sep 22 14:04:29 2005 +0000
+++ b/distrib/utils/sysinst/mbr.c Thu Sep 22 15:41:14 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mbr.c,v 1.69 2005/08/28 19:57:25 dsl Exp $ */
+/* $NetBSD: mbr.c,v 1.70 2005/09/22 15:41:14 chs Exp $ */
/*
* Copyright 1997 Piermont Information Systems Inc.
@@ -1699,7 +1699,7 @@
a2 -= s2;
num = (uint64_t)h1 * a2 - (quad_t)h2 * a1;
denom = (uint64_t)c2 * a1 - (quad_t)c1 * a2;
- if (denom != 0 && num % denom == 0) {
+ if (num != 0 && denom != 0 && num % denom == 0) {
xheads = (int)(num / denom);
xsectors = a1 / (c1 * xheads + h1);
break;
Home |
Main Index |
Thread Index |
Old Index