summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-05-28 23:56:25 +0000
committerRoland McGrath <roland@gnu.org>2002-05-28 23:56:25 +0000
commitdd411f04f3fbd85d6ed29d79b9b8da8343ba31a6 (patch)
tree7ec82c19a1734d76eb51681e0b34aa3be3c7d0d3
parent9e5e904ac83840eaca7fc6616f1f0ea915c42b6d (diff)
2002-05-28 Roland McGrath <roland@frob.com>
* rpctrace.c (print_data): Use if instead of switch to handle FP type sizes, in case double == long double.
-rw-r--r--utils/rpctrace.c14
1 files changed, 8 insertions, 6 deletions
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;
}