Fix Windows mode.
MSVC hates unsigned unary minus.
Change-Id: I777f792f19868bfc4572c383a723b10ea091c0ca
Reviewed-on: https://boringssl-review.googlesource.com/4840
Reviewed-by: Adam Langley <agl@google.com>
diff --git a/ssl/d1_pkt.c b/ssl/d1_pkt.c
index b6570ee..45759f3 100644
--- a/ssl/d1_pkt.c
+++ b/ssl/d1_pkt.c
@@ -798,7 +798,7 @@
/* Align the output so the ciphertext is aligned to |SSL3_ALIGN_PAYLOAD|. */
uintptr_t align = (uintptr_t)wb->buf + DTLS1_RT_HEADER_LENGTH;
- align = (-align) & (SSL3_ALIGN_PAYLOAD - 1);
+ align = (0 - align) & (SSL3_ALIGN_PAYLOAD - 1);
uint8_t *out = wb->buf + align;
wb->offset = align;
size_t max_out = wb->len - wb->offset;