Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/xlint/lint1 lint: merge duplicate code in convert_co...
details: https://anonhg.NetBSD.org/src/rev/ed69d936de84
branches: trunk
changeset: 985495:ed69d936de84
user: rillig <rillig%NetBSD.org@localhost>
date: Sat Aug 28 15:36:54 2021 +0000
description:
lint: merge duplicate code in convert_constant_floating
diffstat:
usr.bin/xlint/lint1/tree.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r cc5e4d91d312 -r ed69d936de84 usr.bin/xlint/lint1/tree.c
--- a/usr.bin/xlint/lint1/tree.c Sat Aug 28 15:25:10 2021 +0000
+++ b/usr.bin/xlint/lint1/tree.c Sat Aug 28 15:36:54 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tree.c,v 1.356 2021/08/28 13:11:10 rillig Exp $ */
+/* $NetBSD: tree.c,v 1.357 2021/08/28 15:36:54 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: tree.c,v 1.356 2021/08/28 13:11:10 rillig Exp $");
+__RCSID("$NetBSD: tree.c,v 1.357 2021/08/28 15:36:54 rillig Exp $");
#endif
#include <float.h>
@@ -2251,6 +2251,7 @@
}
v->v_ldbl = v->v_ldbl > 0 ? max : min;
}
+
if (nt == FLOAT) {
nv->v_ldbl = (float)v->v_ldbl;
} else if (nt == DOUBLE) {
@@ -2258,8 +2259,7 @@
} else if (nt == LDOUBLE) {
nv->v_ldbl = v->v_ldbl;
} else {
- nv->v_quad = (nt == PTR || is_uinteger(nt)) ?
- (int64_t)v->v_ldbl : (int64_t)v->v_ldbl;
+ nv->v_quad = (int64_t)v->v_ldbl;
}
}
Home |
Main Index |
Thread Index |
Old Index