aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_util_format.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-12-20 08:36:25 -0500
committerNick Mathewson <nickm@torproject.org>2018-12-20 08:36:25 -0500
commita517daa56f5848d25ba79617a1a7b82ed2b0a7c0 (patch)
tree88bddb2445449578fefd399ed73a46435113bf2c /src/test/test_util_format.c
parent973a5db80851838e4516de40afe028bc10c425f0 (diff)
downloadtor-a517daa56f5848d25ba79617a1a7b82ed2b0a7c0.tar.gz
tor-a517daa56f5848d25ba79617a1a7b82ed2b0a7c0.zip
base32_decode(): Return number of bytes written on success.
This makes it consistent with base64_decode(). Closes ticket 28913.
Diffstat (limited to 'src/test/test_util_format.c')
-rw-r--r--src/test/test_util_format.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/test_util_format.c b/src/test/test_util_format.c
index fd57125b86..f91171dc28 100644
--- a/src/test/test_util_format.c
+++ b/src/test/test_util_format.c
@@ -346,7 +346,7 @@ test_util_format_base32_decode(void *arg)
const char *src = "mjwgc2dcnrswqmjs";
ret = base32_decode(dst, strlen(expected), src, strlen(src));
- tt_int_op(ret, OP_EQ, 0);
+ tt_int_op(ret, OP_EQ, 10);
tt_str_op(expected, OP_EQ, dst);
}
@@ -357,7 +357,7 @@ test_util_format_base32_decode(void *arg)
const char *src = "mjwgc2dcnrswq";
ret = base32_decode(dst, strlen(expected), src, strlen(src));
- tt_int_op(ret, OP_EQ, 0);
+ tt_int_op(ret, OP_EQ, 8);
tt_mem_op(expected, OP_EQ, dst, strlen(expected));
}