remove some unused code
[libfirm] / ir / ana / height.c
index 43e06a2..7391932 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1995-2007 University of Karlsruhe.  All right reserved.
+ * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
  *
  * This file is part of libFirm.
  *
@@ -24,9 +24,7 @@
  * @date     19.04.2006
  * @version  $Id$
  */
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
+#include "config.h"
 
 #include <stdlib.h>
 #include <stdio.h>
@@ -52,7 +50,7 @@ typedef struct {
        unsigned visited;
 } irn_height_t;
 
-static void *irn_height_init(ir_phase *ph, ir_node *irn, void *data)
+static void *irn_height_init(ir_phase *ph, const ir_node *irn, void *data)
 {
        irn_height_t *h = data ? data : phase_alloc(ph, sizeof(h[0]));
        (void)irn;
@@ -245,7 +243,7 @@ void heights_recompute(heights_t *h)
 
 heights_t *heights_new(ir_graph *irg)
 {
-       heights_t *res = xmalloc(sizeof(res[0]));
+       heights_t *res = XMALLOC(heights_t);
        phase_init(&res->ph, "heights", irg, PHASE_DEFAULT_GROWTH, irn_height_init, NULL);
        res->dump_handle = dump_add_node_info_callback(height_dump_cb, res);
        heights_recompute(res);