Convert codebase to use emalloc.c utility-functions

This also definitely increases readability and makes OOM-conditions
more consistent.
This commit is contained in:
FRIGN
2014-11-16 11:07:26 +01:00
committed by sin
parent 045fc62028
commit e17b9cdd0a
10 changed files with 22 additions and 36 deletions

3
tee.c
View File

@@ -29,8 +29,7 @@ main(int argc, char *argv[])
} ARGEND;
nfps = argc + 1;
if (!(fps = calloc(nfps, sizeof *fps)))
eprintf("calloc:");
fps = ecalloc(nfps, sizeof *fps);
for (i = 0; argc > 0; argc--, argv++, i++)
if (!(fps[i] = fopen(*argv, aflag ? "a" : "w")))