From 45fe97a05bb93c4de4f4ec11efbec2e68603363a Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Thu, 23 Oct 2008 19:03:06 +0000 Subject: [PATCH] Simplify dump_node_req(). [r23144] --- ir/be/benode.c | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/ir/be/benode.c b/ir/be/benode.c index 769e8ce32..28a7ae876 100644 --- a/ir/be/benode.c +++ b/ir/be/benode.c @@ -1410,23 +1410,12 @@ void be_phi_handler_reset(void) static void dump_node_req(FILE *f, int idx, const arch_register_req_t *req, const ir_node *node) { - int did_something = 0; - char buf[16]; - const char *prefix = buf; - - snprintf(buf, sizeof(buf), "#%d ", idx); - buf[sizeof(buf) - 1] = '\0'; - - if(req->cls != 0) { - char tmp[256]; - fprintf(f, prefix); - arch_register_req_format(tmp, sizeof(tmp), req, node); - fprintf(f, "%s", tmp); - did_something = 1; - } + char tmp[256]; + + if (req->cls == NULL) return; - if(did_something) - fprintf(f, "\n"); + arch_register_req_format(tmp, sizeof(tmp), req, node); + fprintf(f, "#%d %s\n", idx, tmp); } /** -- 2.20.1