summary refs log tree commit diff
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2014-10-27 15:44:51 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2014-10-27 15:44:51 +0800
commit0f2b7ee05547fa06b9abb0643b0e3ca514050ab6 (patch)
tree0b29dd532efaffb339dd5a0d764043712aeb5e79
parent[OUTPUT] Add likely tag in outmem (diff)
downloaddash-0f2b7ee05547fa06b9abb0643b0e3ca514050ab6.tar.gz
dash-0f2b7ee05547fa06b9abb0643b0e3ca514050ab6.zip
[OUTPUT] Add ifdefs around MEM_OUT handling in outmem
MEM_OUT is only used by forkless backtick processing which we do
not currently support.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r--ChangeLog1
-rw-r--r--src/output.c6
2 files changed, 7 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 9d2dc7c..47ba519 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,7 @@
 	* Handle embedded NULs correctly in printf.
 	* Replace open-coded flushall in preadbuffer.
 	* Add likely tag in outmem.
+	* Add ifdefs around MEM_OUT handling in outmem.
 
 2014-10-13  Eric Blake <eblake@redhat.com>
 
diff --git a/src/output.c b/src/output.c
index 3e1ae25..4d3b4c2 100644
--- a/src/output.c
+++ b/src/output.c
@@ -154,10 +154,13 @@ buffered:
 	if (!bufsize) {
 		;
 	} else if (dest->buf == NULL) {
+#ifdef notyet
 		if (dest->fd == MEM_OUT && len > bufsize) {
 			bufsize = len;
 		}
+#endif
 		offset = 0;
+#ifdef notyet
 		goto alloc;
 	} else if (dest->fd == MEM_OUT) {
 		offset = bufsize;
@@ -169,6 +172,7 @@ buffered:
 		if (bufsize < offset)
 			goto err;
 alloc:
+#endif
 		INTOFF;
 		dest->buf = ckrealloc(dest->buf, bufsize);
 		dest->bufsize = bufsize;
@@ -184,7 +188,9 @@ alloc:
 		goto buffered;
 
 	if ((xwrite(dest->fd, p, len))) {
+#ifdef notyet
 err:
+#endif
 		dest->flags |= OUTPUT_ERR;
 	}
 #endif