Use XMALLOCF*().
[libfirm] / ir / stat / pattern.c
index 5f532ba..852f721 100644 (file)
@@ -42,8 +42,6 @@
 #include "error.h"
 #include "lc_printf.h"
 
-#ifdef FIRM_STATISTICS
-
 /*
  * just be make some things clear :-), the
  * poor man "generics"
@@ -809,7 +807,7 @@ static HASH_MAP(pattern_entry_t) *read_pattern(const char *fname)
                for (j = 0; j < tmp.len; ++j)
                        put_byte(&buf, fgetc(f));
                entry = pattern_get_entry(&buf, pattern_hash);
-               memcpy(&entry->count, &tmp.count, sizeof(entry->count));
+               entry->count = tmp.count;
        }  /* for */
        fclose(f);
 
@@ -930,5 +928,3 @@ void stat_finish_pattern_history(const char *fname)
 
        status->enable = 0;
 }  /* stat_finish_pattern_history */
-
-#endif /* FIRM_STATISTICS */