From 241bb7dbcb968d35a4b2d8700551524b20e5b76e Mon Sep 17 00:00:00 2001 From: dtucker Date: Fri, 11 Mar 2022 09:04:59 +0000 Subject: [PATCH] Revert previous commit. The problem it was attempting to fix was already fixed by tb@ in rev 1.20. Spotted by tb@ --- lib/libutil/fmt_scaled.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/libutil/fmt_scaled.c b/lib/libutil/fmt_scaled.c index 0b443d4d83a..374901ffe1e 100644 --- a/lib/libutil/fmt_scaled.c +++ b/lib/libutil/fmt_scaled.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fmt_scaled.c,v 1.21 2022/03/11 07:29:53 dtucker Exp $ */ +/* $OpenBSD: fmt_scaled.c,v 1.22 2022/03/11 09:04:59 dtucker Exp $ */ /* * Copyright (c) 2001, 2002, 2003 Ian F. Darwin. All rights reserved. @@ -185,8 +185,7 @@ scan_scaled(char *scaled, long long *result) /* truncate fpart so it does't overflow. * then scale fractional part. */ - while (fpart >= LLONG_MAX / scale_fact || - fpart <= LLONG_MIN / scale_fact) { + while (fpart >= LLONG_MAX / scale_fact) { fpart /= 10; fract_digits--; } -- 2.20.1