Initialize return values to an error
Initializing the return values to an error is best practice and makes
the library more robust against programmer errors.
diff --git a/library/debug.c b/library/debug.c
index 0c46c06..1f7c2a0 100644
--- a/library/debug.c
+++ b/library/debug.c
@@ -44,6 +44,8 @@
#include <stdio.h>
#include <string.h>
+#include "mbedtls/error.h"
+
#if ( defined(__ARMCC_VERSION) || defined(_MSC_VER) ) && \
!defined(inline) && !defined(__cplusplus)
#define inline __inline
@@ -85,7 +87,7 @@
{
va_list argp;
char str[DEBUG_BUF_SIZE];
- int ret;
+ int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
if( NULL == ssl ||
NULL == ssl->conf ||