Skip to content

Commit

Permalink
Fix formatting and detail of comments in PR Mbed-TLS#730
Browse files Browse the repository at this point in the history
  • Loading branch information
simonbutcher authored and Patater committed Mar 27, 2018
1 parent 14af87c commit 041a00c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
12 changes: 7 additions & 5 deletions library/entropy_poll.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,10 @@
#include <windows.h>
#include <bcrypt.h>
#if defined(_MSC_VER) && _MSC_VER <= 1600
/* Visual Studio 2010 and earlier issue a warning when both <stdint.h> and <intsafe.h> are included, as they
* redefine a number of <TYPE>_MAX constants. These constants are guaranteed to be the same, though, so
* we suppress the warning when including intsafe.h.
/* Visual Studio 2010 and earlier issue a warning when both <stdint.h> and
* <intsafe.h> are included, as they redefine a number of <TYPE>_MAX constants.
* These constants are guaranteed to be the same, though, so we suppress the
* warning when including intsafe.h.
*/
#pragma warning( push )
#pragma warning( disable : 4005 )
Expand All @@ -76,8 +77,9 @@ int mbedtls_platform_entropy_poll( void *data, unsigned char *output, size_t len
*olen = 0;

/*
* BCryptGenRandom takes ULONG for size, which is smaller than size_t on 64-bit platforms.
* Ensure len's value can be safely converted into a ULONG.
* BCryptGenRandom takes ULONG for size, which is smaller than size_t on
* 64-bit Windows platforms. Ensure len's value can be safely converted into
* a ULONG.
*/
if ( FAILED( SizeTToULong( len, &len_as_ulong ) ) )
{
Expand Down
7 changes: 4 additions & 3 deletions library/x509_crt.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,10 @@
#if defined(_WIN32) && !defined(EFIX64) && !defined(EFI32)
#include <windows.h>
#if defined(_MSC_VER) && _MSC_VER <= 1600
/* Visual Studio 2010 and earlier issue a warning when both <stdint.h> and <intsafe.h> are included, as they
* redefine a number of <TYPE>_MAX constants. These constants are guaranteed to be the same, though, so
* we suppress the warning when including intsafe.h.
/* Visual Studio 2010 and earlier issue a warning when both <stdint.h> and
* <intsafe.h> are included, as they redefine a number of <TYPE>_MAX constants.
* These constants are guaranteed to be the same, though, so we suppress the
* warning when including intsafe.h.
*/
#pragma warning( push )
#pragma warning( disable : 4005 )
Expand Down

0 comments on commit 041a00c

Please sign in to comment.