Do not allocate memory for line buffered output

libc is perfectly capable of allocating memory for its buffers,
so let it do its job.

* strace.c (init): Do not allocate memory for setvbuf invocation.
This commit is contained in:
Дмитрий Левин 2016-12-04 18:36:31 +00:00
parent 6be0d91285
commit 2ecb0a0467

View File

@ -1834,8 +1834,7 @@ init(int argc, char *argv[])
}
if (!outfname || outfname[0] == '|' || outfname[0] == '!') {
char *buf = xmalloc(BUFSIZ);
setvbuf(shared_log, buf, _IOLBF, BUFSIZ);
setvbuf(shared_log, NULL, _IOLBF, 0);
}
if (outfname && argv[0]) {
if (!opt_intr)