From dd411f04f3fbd85d6ed29d79b9b8da8343ba31a6 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 28 May 2002 23:56:25 +0000 Subject: 2002-05-28 Roland McGrath * rpctrace.c (print_data): Use if instead of switch to handle FP type sizes, in case double == long double. --- utils/rpctrace.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'utils') diff --git a/utils/rpctrace.c b/utils/rpctrace.c index 9571a2ee..eaef3d05 100644 --- a/utils/rpctrace.c +++ b/utils/rpctrace.c @@ -975,12 +975,14 @@ print_data (mach_msg_type_name_t type, break; case MACH_MSG_TYPE_REAL: - switch (eltsize) - { - case sizeof (float): FMT ("%g", float); - case sizeof (double): FMT ("%g", double); - case sizeof (long double): FMT ("%Lg", long double); - } + if (eltsize == sizeof (float)) + FMT ("%g", float); + else if (eltsize == sizeof (double)) + FMT ("%g", double); + else if (eltsize == sizeof (long double)) + FMT ("%Lg", long double); + else + abort (); break; } -- cgit v1.2.3