diff options
| author | Russ Cox <rsc@swtch.com> | 2008-03-07 10:45:59 -0500 |
|---|---|---|
| committer | Russ Cox <rsc@swtch.com> | 2008-03-07 10:45:59 -0500 |
| commit | 734a96bd1691395765ceae0bf9afa86bda8ab07b (patch) | |
| tree | 5cb8eafe1b12ebdf759d268af47438ef054a39b0 /src/cmd/acme/util.c | |
| parent | 7927fe8f9efb61c7bcdfc63997a4e785c97c53ef (diff) | |
| download | plan9port-734a96bd1691395765ceae0bf9afa86bda8ab07b.tar.gz plan9port-734a96bd1691395765ceae0bf9afa86bda8ab07b.zip | |
acme: sync against Plan 9, remove -$ option
Diffstat (limited to 'src/cmd/acme/util.c')
| -rw-r--r-- | src/cmd/acme/util.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/cmd/acme/util.c b/src/cmd/acme/util.c index fd4d97ab..7675346a 100644 --- a/src/cmd/acme/util.c +++ b/src/cmd/acme/util.c @@ -415,11 +415,8 @@ emalloc(uint n) void *p; p = malloc(n); - if(p == nil){ - fprint(2, "allocating %d from %lux: %r\n", n, getcallerpc(&n)); - *(int*)0=0; + if(p == nil) error("malloc failed"); - } setmalloctag(p, getcallerpc(&n)); memset(p, 0, n); return p; @@ -429,10 +426,8 @@ void* erealloc(void *p, uint n) { p = realloc(p, n); - if(p == nil){ - fprint(2, "reallocating %d: %r\n", n); + if(p == nil) error("realloc failed"); - } setmalloctag(p, getcallerpc(&n)); return p; } |
