Fix tool build on Windows.

C++ doesn't allow implicit void* casts.

Change-Id: I50a2ab3fce6a38470b4e8216bd461ba2cd2c2215
Reviewed-on: https://boringssl-review.googlesource.com/2971
Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
David Benjamin 2015-01-21 15:56:14 -05:00 committed by Adam Langley
parent cb878e20f3
commit 384673ceb7

View File

@ -170,7 +170,13 @@ struct free_functor {
};
#if defined(OPENSSL_WINDOWS)
#define AllocAligned malloc
uint8_t *AllocAligned(size_t size) {
void *ptr = malloc(size);
if (ptr == NULL) {
abort();
}
return static_cast<uint8_t*>(ptr);
}
#else
uint8_t *AllocAligned(size_t size) {
void *ptr;