Skip to content

Commit 50a3be6

Browse files
committed
wolfcrypt/src/sp_int.c. src/ssl_asn1.c. src/internal.c: rename several declarations to avoid shadowing global functions, for the convenience of obsolete (pre-4v8) gcc -Wshadow.
1 parent f7b911f commit 50a3be6

3 files changed

Lines changed: 17 additions & 17 deletions

File tree

src/internal.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25346,12 +25346,12 @@ int SendAsyncData(WOLFSSL* ssl)
2534625346
* 2 in SCR and we have plain data ready
2534725347
* Early data logic may bypass this logic in TLSv1.3 when appropriate.
2534825348
*/
25349-
static int ssl_in_handshake(WOLFSSL *ssl, int send)
25349+
static int ssl_in_handshake(WOLFSSL *ssl, int sending_data)
2535025350
{
2535125351
int SendAsyncData = 1;
2535225352
(void)SendAsyncData;
2535325353
if (IsSCR(ssl)) {
25354-
if (send) {
25354+
if (sending_data) {
2535525355
/* allow sending data in SCR */
2535625356
return 0;
2535725357
} else {

src/ssl_asn1.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,36 +1093,36 @@ static int wolfssl_asn1_integer_require_len(WOLFSSL_ASN1_INTEGER* a, int len,
10931093
*/
10941094
WOLFSSL_ASN1_INTEGER* wolfSSL_ASN1_INTEGER_dup(const WOLFSSL_ASN1_INTEGER* src)
10951095
{
1096-
WOLFSSL_ASN1_INTEGER* dup = NULL;
1096+
WOLFSSL_ASN1_INTEGER* dst = NULL;
10971097

10981098
WOLFSSL_ENTER("wolfSSL_ASN1_INTEGER_dup");
10991099

1100-
/* Check for object to duplicate. */
1100+
/* Check for object to dstlicate. */
11011101
if (src != NULL) {
11021102
/* Create a new ASN.1 INTEGER object to be copied into. */
1103-
dup = wolfSSL_ASN1_INTEGER_new();
1103+
dst = wolfSSL_ASN1_INTEGER_new();
11041104
}
11051105
/* Check for object to copy into. */
1106-
if (dup != NULL) {
1106+
if (dst != NULL) {
11071107
/* Copy simple fields. */
1108-
dup->length = src->length;
1109-
dup->negative = src->negative;
1110-
dup->type = src->type;
1108+
dst->length = src->length;
1109+
dst->negative = src->negative;
1110+
dst->type = src->type;
11111111

11121112
if (!src->isDynamic) {
11131113
/* Copy over data from/to fixed buffer. */
1114-
XMEMCPY(dup->intData, src->intData, WOLFSSL_ASN1_INTEGER_MAX);
1114+
XMEMCPY(dst->intData, src->intData, WOLFSSL_ASN1_INTEGER_MAX);
11151115
}
1116-
else if (wolfssl_asn1_integer_require_len(dup, src->length, 0) == 0) {
1117-
wolfSSL_ASN1_INTEGER_free(dup);
1118-
dup = NULL;
1116+
else if (wolfssl_asn1_integer_require_len(dst, src->length, 0) == 0) {
1117+
wolfSSL_ASN1_INTEGER_free(dst);
1118+
dst = NULL;
11191119
}
11201120
else {
1121-
XMEMCPY(dup->data, src->data, (size_t)src->length);
1121+
XMEMCPY(dst->data, src->data, (size_t)src->length);
11221122
}
11231123
}
11241124

1125-
return dup;
1125+
return dst;
11261126
}
11271127
#endif /* OPENSSL_EXTRA || WOLFSSL_WPAS_SMALL */
11281128

wolfcrypt/src/sp_int.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8216,7 +8216,7 @@ int sp_addmod_ct(const sp_int* a, const sp_int* b, const sp_int* m, sp_int* r)
82168216
* @return MP_OKAY on success.
82178217
*/
82188218
static void _sp_submod_ct(const sp_int* a, const sp_int* b, const sp_int* m,
8219-
unsigned int max, sp_int* r)
8219+
unsigned int max_size, sp_int* r)
82208220
{
82218221
#ifndef SQR_MUL_ASM
82228222
sp_int_sword w;
@@ -8237,7 +8237,7 @@ static void _sp_submod_ct(const sp_int* a, const sp_int* b, const sp_int* m,
82378237
l = 0;
82388238
h = 0;
82398239
#endif
8240-
for (i = 0; i < max; i++) {
8240+
for (i = 0; i < max_size; i++) {
82418241
/* Values past 'used' are not initialized. */
82428242
mask_a += (i == a->used);
82438243
mask_b += (i == b->used);

0 commit comments

Comments
 (0)