Found additional VS unused heap warnings. Replace tabs with 4-spaces.

This commit is contained in:
David Garske
2018-04-05 12:02:58 -07:00
parent a78c6ba4ea
commit 426335b68f

View File

@@ -919,6 +919,8 @@ static TLSX* TLSX_New(TLSX_Type type, void* data, void* heap)
{
TLSX* extension = (TLSX*)XMALLOC(sizeof(TLSX), heap, DYNAMIC_TYPE_TLSX);
(void)heap;
if (extension) {
extension->type = type;
extension->data = data;
@@ -2886,6 +2888,8 @@ static int TLSX_SupportedCurve_New(SupportedCurve** curve, word16 name,
if (curve == NULL)
return BAD_FUNC_ARG;
(void)heap;
*curve = (SupportedCurve*)XMALLOC(sizeof(SupportedCurve), heap,
DYNAMIC_TYPE_TLSX);
if (*curve == NULL)
@@ -2902,6 +2906,8 @@ static int TLSX_PointFormat_New(PointFormat** point, byte format, void* heap)
if (point == NULL)
return BAD_FUNC_ARG;
(void)heap;
*point = (PointFormat*)XMALLOC(sizeof(PointFormat), heap,
DYNAMIC_TYPE_TLSX);
if (*point == NULL)
@@ -4393,7 +4399,7 @@ int TLSX_ValidateQSHScheme(TLSX** extensions, word16 theirs) {
for (format = (QSHScheme*)extension->data; format; format = format->next) {
if (format->name == theirs) {
WOLFSSL_MSG("Found Matching QSH Scheme");
WOLFSSL_MSG("Found Matching QSH Scheme");
return 1; /* have QSH */
}
}
@@ -4437,33 +4443,33 @@ int TLSX_UseQSHScheme(TLSX** extensions, word16 name, byte* pKey, word16 pkeySz,
/* if scheme is implemented than add */
if (TLSX_HaveQSHScheme(name)) {
if ((ret = TLSX_QSH_Append(&format, name, pKey, pkeySz)) != 0)
return ret;
if ((ret = TLSX_QSH_Append(&format, name, pKey, pkeySz)) != 0)
return ret;
if (!extension) {
if ((ret = TLSX_Push(extensions, TLSX_QUANTUM_SAFE_HYBRID, format,
if (!extension) {
if ((ret = TLSX_Push(extensions, TLSX_QUANTUM_SAFE_HYBRID, format,
heap)) != 0) {
XFREE(format, 0, DYNAMIC_TYPE_TLSX);
return ret;
}
}
else {
/* push new QSH object to extension data. */
format->next = (QSHScheme*)extension->data;
extension->data = (void*)format;
XFREE(format, 0, DYNAMIC_TYPE_TLSX);
return ret;
}
}
else {
/* push new QSH object to extension data. */
format->next = (QSHScheme*)extension->data;
extension->data = (void*)format;
/* look for another format of the same name to remove (replacement) */
do {
if (format->next && (format->next->name == name)) {
QSHScheme* next = format->next;
/* look for another format of the same name to remove (replacement) */
do {
if (format->next && (format->next->name == name)) {
QSHScheme* next = format->next;
format->next = next->next;
XFREE(next, 0, DYNAMIC_TYPE_TLSX);
format->next = next->next;
XFREE(next, 0, DYNAMIC_TYPE_TLSX);
break;
}
} while ((format = format->next));
}
break;
}
} while ((format = format->next));
}
}
return WOLFSSL_SUCCESS;
}