From 7a47ba636959e5f92ce1b1f5f812128b05157ad6 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Wed, 21 Feb 2018 07:38:59 +0000 Subject: [PATCH] cleaned up code a bit --- lib/print.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/print.c b/lib/print.c index 2a32a84..4f7d242 100644 --- a/lib/print.c +++ b/lib/print.c @@ -181,6 +181,11 @@ next: if (outbfmt(hcl, mask, "%zd", HCL_OOP_TO_SMOOI(obj)) <= -1) return -1; goto done; } + else if (HCL_OOP_IS_SMPTR(obj)) + { + if (outbfmt(hcl, mask, "#\\p%zX", (hcl_oow_t)HCL_OOP_TO_SMPTR(obj)) <= -1) return -1; + goto done; + } else if (HCL_OOP_IS_CHAR(obj)) { hcl_ooch_t ch = HCL_OOP_TO_CHAR(obj); @@ -189,11 +194,6 @@ next: outbfmt(hcl, mask, "\'") <= -1) return -1; goto done; } - else if (HCL_OOP_IS_SMPTR(obj)) - { - if (outbfmt(hcl, mask, "#\\p%zX", (hcl_oow_t)HCL_OOP_TO_SMPTR(obj)) <= -1) return -1; - goto done; - } else if (HCL_OOP_IS_ERROR(obj)) { if (outbfmt(hcl, mask, "#\\e%zd", (hcl_ooi_t)HCL_OOP_TO_ERROR(obj)) <= -1) return -1;