From db20c10423883f357f5cebc12a29cec4b16e95be Mon Sep 17 00:00:00 2001
From: Paul Bakker
Date: Tue, 17 Jun 2014 14:34:44 +0200
Subject: [PATCH] Add #endif comments for #endif more than 10 lines from #if /
#else
---
include/polarssl/bignum.h | 4 ++--
include/polarssl/ecp.h | 4 ++--
library/bignum.c | 2 +-
library/net.c | 6 +++---
library/ssl_srv.c | 2 +-
library/x509.c | 2 +-
6 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/include/polarssl/bignum.h b/include/polarssl/bignum.h
index ecc4a135e..3feee8fd9 100644
--- a/include/polarssl/bignum.h
+++ b/include/polarssl/bignum.h
@@ -167,8 +167,8 @@ typedef uint32_t t_udbl;
#define POLARSSL_HAVE_UDBL
#endif
#endif
- #endif
- #endif
+ #endif /* !POLARSSL_HAVE_INT32 && __GNUC__ && 64-bit platform */
+ #endif /* !POLARSSL_HAVE_INT32 && _MSC_VER && _M_AMD64 */
#endif /* POLARSSL_HAVE_INT16 */
#endif /* POLARSSL_HAVE_INT8 */
diff --git a/include/polarssl/ecp.h b/include/polarssl/ecp.h
index 333986dde..7192f1e6c 100644
--- a/include/polarssl/ecp.h
+++ b/include/polarssl/ecp.h
@@ -208,7 +208,7 @@ ecp_keypair;
* 192 640 640 633 587 476
*/
#define POLARSSL_ECP_WINDOW_SIZE 6 /**< Maximum window size used */
-#endif
+#endif /* POLARSSL_ECP_WINDOW_SIZE */
#if !defined(POLARSSL_ECP_FIXED_POINT_OPTIM)
/*
@@ -223,7 +223,7 @@ ecp_keypair;
* Change this value to 0 to reduce peak memory usage.
*/
#define POLARSSL_ECP_FIXED_POINT_OPTIM 1 /**< Enable fixed-point speed-up */
-#endif
+#endif /* POLARSSL_ECP_FIXED_POINT_OPTIM */
/* \} name SECTION: Module settings */
diff --git a/library/bignum.c b/library/bignum.c
index e55569253..110c3f4b0 100644
--- a/library/bignum.c
+++ b/library/bignum.c
@@ -1301,7 +1301,7 @@ int mpi_div_mpi( mpi *Q, mpi *R, const mpi *A, const mpi *B )
r0 -= m;
Z.p[i - t - 1] = ( q1 << biH ) | q0;
-#endif
+#endif /* POLARSSL_HAVE_UDBL && !64-bit Apple with Clang 5.0 */
}
Z.p[i - t - 1]++;
diff --git a/library/net.c b/library/net.c
index 086614912..8ccf12089 100644
--- a/library/net.c
+++ b/library/net.c
@@ -62,7 +62,7 @@
static int wsa_init_done = 0;
-#else
+#else /* ( _WIN32 || _WIN32_WCE ) && !EFIX64 && !EFI32 */
#include
#include
@@ -91,7 +91,7 @@ static int wsa_init_done = 0;
#include
#endif
-#endif
+#endif /* ( _WIN32 || _WIN32_WCE ) && !EFIX64 && !EFI32 */
#include
#include
@@ -409,7 +409,7 @@ static int net_would_block( int fd )
}
return( 0 );
}
-#endif
+#endif /* ( _WIN32 || _WIN32_WCE ) && !EFIX64 && !EFI32 */
/*
* Accept a connection from a remote client
diff --git a/library/ssl_srv.c b/library/ssl_srv.c
index cd207c509..03b801099 100644
--- a/library/ssl_srv.c
+++ b/library/ssl_srv.c
@@ -2340,7 +2340,7 @@ curve_matching_done:
}
}
else
-#endif
+#endif /* POLARSSL_SSL_PROTO_TLS1_2 */
#if defined(POLARSSL_SSL_PROTO_SSL3) || defined(POLARSSL_SSL_PROTO_TLS1) || \
defined(POLARSSL_SSL_PROTO_TLS1_1)
if ( ciphersuite_info->key_exchange ==
diff --git a/library/x509.c b/library/x509.c
index adb025c87..73e13475f 100644
--- a/library/x509.c
+++ b/library/x509.c
@@ -592,7 +592,7 @@ int x509_get_sig_alg( const x509_buf *sig_oid, const x509_buf *sig_params,
*sig_opts = (void *) pss_opts;
}
else
-#endif
+#endif /* POLARSSL_X509_RSASSA_PSS_SUPPORT */
{
/* Make sure parameters are absent or NULL */
if( ( sig_params->tag != ASN1_NULL && sig_params->tag != 0 ) ||