From 8120969745e109d6500c765aa47172f27f44b790 Mon Sep 17 00:00:00 2001 From: deraadt <> Date: Mon, 28 Sep 2015 18:58:33 +0000 Subject: remove excessive brackets on pointer math --- src/lib/libcrypto/bn/bn_print.c | 16 ++++++++-------- src/lib/libssl/src/crypto/bn/bn_print.c | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/lib/libcrypto/bn/bn_print.c b/src/lib/libcrypto/bn/bn_print.c index f97f310eda..1614a11449 100644 --- a/src/lib/libcrypto/bn/bn_print.c +++ b/src/lib/libcrypto/bn/bn_print.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bn_print.c,v 1.27 2015/09/27 19:41:37 miod Exp $ */ +/* $OpenBSD: bn_print.c,v 1.28 2015/09/28 18:58:33 deraadt Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -84,16 +84,16 @@ BN_bn2hex(const BIGNUM *a) } p = buf; if (BN_is_negative(a)) - *(p++) = '-'; + *p++ = '-'; if (BN_is_zero(a)) - *(p++) = '0'; + *p++ = '0'; for (i = a->top - 1; i >=0; i--) { for (j = BN_BITS2 - 8; j >= 0; j -= 8) { /* strip leading zeros */ v = ((int)(a->d[i] >> (long)j)) & 0xff; if (z || (v != 0)) { - *(p++) = Hex[v >> 4]; - *(p++) = Hex[v & 0x0f]; + *p++ = Hex[v >> 4]; + *p++ = Hex[v & 0x0f]; z = 1; } } @@ -122,9 +122,9 @@ BN_bn2dec(const BIGNUM *a) } p = buf; if (BN_is_negative(a)) - *(p++) = '-'; - *(p++) = '0'; - *(p++) = '\0'; + *p++ = '-'; + *p++ = '0'; + *p++ = '\0'; return (buf); } diff --git a/src/lib/libssl/src/crypto/bn/bn_print.c b/src/lib/libssl/src/crypto/bn/bn_print.c index f97f310eda..1614a11449 100644 --- a/src/lib/libssl/src/crypto/bn/bn_print.c +++ b/src/lib/libssl/src/crypto/bn/bn_print.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bn_print.c,v 1.27 2015/09/27 19:41:37 miod Exp $ */ +/* $OpenBSD: bn_print.c,v 1.28 2015/09/28 18:58:33 deraadt Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -84,16 +84,16 @@ BN_bn2hex(const BIGNUM *a) } p = buf; if (BN_is_negative(a)) - *(p++) = '-'; + *p++ = '-'; if (BN_is_zero(a)) - *(p++) = '0'; + *p++ = '0'; for (i = a->top - 1; i >=0; i--) { for (j = BN_BITS2 - 8; j >= 0; j -= 8) { /* strip leading zeros */ v = ((int)(a->d[i] >> (long)j)) & 0xff; if (z || (v != 0)) { - *(p++) = Hex[v >> 4]; - *(p++) = Hex[v & 0x0f]; + *p++ = Hex[v >> 4]; + *p++ = Hex[v & 0x0f]; z = 1; } } @@ -122,9 +122,9 @@ BN_bn2dec(const BIGNUM *a) } p = buf; if (BN_is_negative(a)) - *(p++) = '-'; - *(p++) = '0'; - *(p++) = '\0'; + *p++ = '-'; + *p++ = '0'; + *p++ = '\0'; return (buf); } -- cgit v1.2.3-55-g6feb