[tor-commits] [tor/master] Remove remaining references to "nulterminate" in comments

nickm at torproject.org nickm at torproject.org
Wed Sep 2 12:51:53 UTC 2015


commit 4cff437a0a934e3a6712f43bd56ddfd4d2be0a80
Author: Nick Mathewson <nickm at torproject.org>
Date:   Wed Sep 2 08:50:26 2015 -0400

    Remove remaining references to "nulterminate" in comments
    
    Thanks to Roger for spotting this!
---
 src/or/buffers.c        |    5 +----
 src/test/test_buffers.c |    3 ---
 2 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/src/or/buffers.c b/src/or/buffers.c
index 01a1b1f..cc2f6f4 100644
--- a/src/or/buffers.c
+++ b/src/or/buffers.c
@@ -178,13 +178,10 @@ preferred_chunk_size(size_t target)
 /** Collapse data from the first N chunks from <b>buf</b> into buf->head,
  * growing it as necessary, until buf->head has the first <b>bytes</b> bytes
  * of data from the buffer, or until buf->head has all the data in <b>buf</b>.
- *
- * If <b>nulterminate</b> is true, ensure that there is a 0 byte in
- * buf->head->mem right after all the data. */
+ */
 STATIC void
 buf_pullup(buf_t *buf, size_t bytes)
 {
-  /* XXXX nothing uses nulterminate; remove it. */
   chunk_t *dest, *src;
   size_t capacity;
   if (!buf->head)
diff --git a/src/test/test_buffers.c b/src/test/test_buffers.c
index 4b6e539..29ee408 100644
--- a/src/test/test_buffers.c
+++ b/src/test/test_buffers.c
@@ -206,9 +206,6 @@ test_buffer_pullup(void *arg)
   stuff = tor_malloc(16384);
   tmp = tor_malloc(16384);
 
-  /* Note: this test doesn't check the nulterminate argument to buf_pullup,
-     since nothing actually uses it.  We should remove it some time. */
-
   buf = buf_new_with_capacity(3000); /* rounds up to next power of 2. */
 
   tt_assert(buf);





More information about the tor-commits mailing list