Fix formatting: remove trailing spaces, #endif with comments (> 10 lines)
diff --git a/library/sha512.c b/library/sha512.c
index 1d4b977..a55a94b 100644
--- a/library/sha512.c
+++ b/library/sha512.c
@@ -65,7 +65,7 @@
         | ( (uint64_t) (b)[(i) + 6] <<  8 )       \
         | ( (uint64_t) (b)[(i) + 7]       );      \
 }
-#endif
+#endif /* GET_UINT64_BE */
 
 #ifndef PUT_UINT64_BE
 #define PUT_UINT64_BE(n,b,i)                            \
@@ -79,7 +79,7 @@
     (b)[(i) + 6] = (unsigned char) ( (n) >>  8 );       \
     (b)[(i) + 7] = (unsigned char) ( (n)       );       \
 }
-#endif
+#endif /* PUT_UINT64_BE */
 
 /*
  * Round constants
@@ -461,7 +461,7 @@
 /*
  * FIPS-180-2 test vectors
  */
-static unsigned char sha512_test_buf[3][113] = 
+static unsigned char sha512_test_buf[3][113] =
 {
     { "abc" },
     { "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"
@@ -765,6 +765,6 @@
     return( 0 );
 }
 
-#endif
+#endif /* POLARSSL_SELF_TEST */
 
-#endif
+#endif /* POLARSSL_SHA512_C */