aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorChristos Zoulas <christos@zoulas.com>2018-09-30 16:59:46 -0400
committerViktor Dukhovni <openssl-users@dukhovni.org>2018-12-09 22:02:50 -0500
commit5db120dc351177173bb25e963be095404c31fbce (patch)
treee1e26a56eea204c5595755e04ed6eea2b2afd810 /test
parentbda1f0c0d6987232f1f8ca2a72755ac62a99fc4c (diff)
downloadopenssl-5db120dc351177173bb25e963be095404c31fbce.tar.gz
Fix const issues
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Diffstat (limited to 'test')
-rw-r--r--test/testutil/format_output.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/testutil/format_output.c b/test/testutil/format_output.c
index b2207503f9..ead03841d5 100644
--- a/test/testutil/format_output.c
+++ b/test/testutil/format_output.c
@@ -206,6 +206,7 @@ static int convert_bn_memory(const unsigned char *in, size_t bytes,
{
int n = bytes * 2, i;
char *p = out, *q = NULL;
+ const char *r;
if (bn != NULL && !BN_is_zero(bn)) {
hex_convert_memory(in, bytes, out, BN_OUTPUT_SIZE);
@@ -248,10 +249,10 @@ static int convert_bn_memory(const unsigned char *in, size_t bytes,
}
*p = '\0';
if (bn == NULL)
- q = "NULL";
+ r = "NULL";
else
- q = BN_is_negative(bn) ? "-0" : "0";
- strcpy(p - strlen(q), q);
+ r = BN_is_negative(bn) ? "-0" : "0";
+ strcpy(p - strlen(r), r);
return 0;
}