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/2fb2bd6e1b3d
branches: trunk
changeset: 1023171:2fb2bd6e1b3d
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 e97205b0af67 -r 2fb2bd6e1b3d 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