aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_util.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2013-07-15 12:26:55 -0400
committerNick Mathewson <nickm@torproject.org>2013-07-15 12:26:55 -0400
commit22977b7c1dd6b693237fb3fed1cd6f88ec71cb21 (patch)
tree1e0432725155ce4f4e11823d0265cecc79a03226 /src/test/test_util.c
parent449b2b7c58e5dd5b33941a5142524a66c64c98ec (diff)
downloadtor-22977b7c1dd6b693237fb3fed1cd6f88ec71cb21.tar.gz
tor-22977b7c1dd6b693237fb3fed1cd6f88ec71cb21.zip
Expose format_hex_number_..., and rename it to ..._sigsafe().
There are some other places in the code that will want a signal-safe way to format numbers, so it shouldn't be static to util.c.
Diffstat (limited to 'src/test/test_util.c')
-rw-r--r--src/test/test_util.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/test/test_util.c b/src/test/test_util.c
index 603eded97d..d5ce1eb778 100644
--- a/src/test/test_util.c
+++ b/src/test/test_util.c
@@ -2627,7 +2627,7 @@ test_util_spawn_background_partial_read(void *ptr)
}
/**
- * Test for format_hex_number_for_helper_exit_status()
+ * Test for format_hex_number_sigsafe()
*/
static void
@@ -2653,8 +2653,7 @@ test_util_format_hex_number(void *ptr)
(void)ptr;
for (i = 0; test_data[i].str != NULL; ++i) {
- len = format_hex_number_for_helper_exit_status(test_data[i].x,
- buf, HEX_ERRNO_SIZE);
+ len = format_hex_number_sigsafe(test_data[i].x, buf, HEX_ERRNO_SIZE);
test_neq(len, 0);
buf[len] = '\0';
test_streq(buf, test_data[i].str);