Remove trailing whitespace
[oota-llvm.git] / utils / Burg / zalloc.c
1 char rcsid_zalloc[] = "$Id$";
2
3 #include <stdio.h>
4 #include <string.h>
5 #include <stdlib.h>
6 #include "b.h"
7
8 int
9 fatal(const char *name, int line)
10 {
11         fprintf(stderr, "assertion failed: file %s, line %d\n", name, line);
12         exit(1);
13         return 0;
14 }
15
16 void *
17 zalloc(size) unsigned int size;
18 {
19         void *t = (void *) malloc(size);
20         if (!t) {
21                 fprintf(stderr, "Malloc failed---PROGRAM ABORTED\n");
22                 exit(1);
23         }
24         memset(t, 0, size);
25         return t;
26 }
27
28 void
29 zfree(p) void *p;
30 {
31         free(p);
32 }