From: Kurt Roeckx Date: Sun, 15 Jan 2017 11:33:45 +0000 (+0100) Subject: Fix VC warnings about unary minus to an unsigned type. X-Git-Tag: OpenSSL_1_0_2l~40 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=9abe889702bdc73f9490f611f54bf9c865702554;p=oweals%2Fopenssl.git Fix VC warnings about unary minus to an unsigned type. Reviewed-by: Andy Polyakov GH: #2230 (partial cherry pick from commit 68d4bcfd0651c7ea5d37ca52abc0d2e6e6b3bd20) --- diff --git a/crypto/asn1/x_long.c b/crypto/asn1/x_long.c index efdf574e24..2fd3a903d1 100644 --- a/crypto/asn1/x_long.c +++ b/crypto/asn1/x_long.c @@ -126,7 +126,7 @@ static int long_i2c(ASN1_VALUE **pval, unsigned char *cont, int *putype, * set. */ if (ltmp < 0) - utmp = -(unsigned long)ltmp - 1; + utmp = 0 - (unsigned long)ltmp - 1; else utmp = ltmp; clen = BN_num_bits_word(utmp);