fix format and comment issues

Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
diff --git a/library/ssl_tls.c b/library/ssl_tls.c
index 1cda3a7..c0703a2 100644
--- a/library/ssl_tls.c
+++ b/library/ssl_tls.c
@@ -1710,7 +1710,7 @@
 #if defined(MBEDTLS_SSL_PROTO_TLS1_2)
     if( ssl->tls_version == MBEDTLS_SSL_VERSION_TLS1_2 )
     {
-        if( ssl->handshake->ciphersuite_info->mac == MBEDTLS_MD_SHA384)
+        if( ssl->handshake->ciphersuite_info->mac == MBEDTLS_MD_SHA384 )
             alg = PSA_ALG_TLS12_PSK_TO_MS( PSA_ALG_SHA_384 );
         else
             alg = PSA_ALG_TLS12_PSK_TO_MS( PSA_ALG_SHA_256 );
diff --git a/library/ssl_tls13_keys.c b/library/ssl_tls13_keys.c
index 8d01fc8..c5ec5bf 100644
--- a/library/ssl_tls13_keys.c
+++ b/library/ssl_tls13_keys.c
@@ -359,7 +359,7 @@
 
     ret = 0;
 
-    if( ( input != NULL ) && ( input_len != 0 ) )
+    if( input != NULL && input_len != 0 )
     {
         memcpy( tmp_input, input, input_len );
         ilen = input_len;
@@ -1579,7 +1579,7 @@
         return( 0 );
 
     status = psa_get_key_attributes( ssl->handshake->psk_opaque, &key_attributes );
-    if( status != PSA_SUCCESS)
+    if( status != PSA_SUCCESS )
     {
         return( psa_ssl_status_to_mbedtls( status ) );
     }
@@ -1593,7 +1593,7 @@
 
     status = psa_export_key( ssl->handshake->psk_opaque,
                              (uint8_t *)*psk, *psk_len, psk_len );
-    if( status != PSA_SUCCESS)
+    if( status != PSA_SUCCESS )
     {
         mbedtls_free( (void *)*psk );
         return( psa_ssl_status_to_mbedtls( status ) );
diff --git a/library/ssl_tls13_keys.h b/library/ssl_tls13_keys.h
index c5baf28..34c00a4 100644
--- a/library/ssl_tls13_keys.h
+++ b/library/ssl_tls13_keys.h
@@ -693,12 +693,12 @@
 int mbedtls_ssl_tls13_compute_application_transform( mbedtls_ssl_context *ssl );
 
 /**
- * \brief Export TLS 1.3 PSK key from handshake context
+ * \brief Export TLS 1.3 PSK from handshake context
  *
  * \param ssl  The SSL context to operate on.
- * \param psk  PSK key output pointer.
+ * \param psk  PSK output pointer.
  * \param psk_len
- *             Length of PSK key.
+ *             Length of PSK.
  *
  * \returns    \c 0 on success.
  * \returns    A negative error code on failure.
diff --git a/library/ssl_tls13_server.c b/library/ssl_tls13_server.c
index d527959..04fa5de 100644
--- a/library/ssl_tls13_server.c
+++ b/library/ssl_tls13_server.c
@@ -1057,9 +1057,9 @@
                                     ciphersuite_info == NULL ?
                                         "Unkown": ciphersuite_info->name ) );
     }
-#else
+#else /* MBEDTLS_DEBUG_C */
     p = cipher_suites_end;
-#endif /* MBEDTLS_DEBUG_C */
+#endif /* !MBEDTLS_DEBUG_C */
 
     /* ...
      * opaque legacy_compression_methods<1..2^8-1>;
@@ -1331,7 +1331,7 @@
      * Search for a matching ciphersuite
      */
     for ( const unsigned char * p_chiper_suite = cipher_suites ;
-            p_chiper_suite < cipher_suites_end; p_chiper_suite += 2 )
+          p_chiper_suite < cipher_suites_end; p_chiper_suite += 2 )
     {
         uint16_t cipher_suite;
         const mbedtls_ssl_ciphersuite_t* ciphersuite_info;