Removed ugly size_t less than zero check.
authorHikar <hikar@davelog.net>
Sat, 18 Feb 2017 07:44:49 +0000 (08:44 +0100)
committerRich Salz <rsalz@openssl.org>
Tue, 21 Feb 2017 17:30:23 +0000 (12:30 -0500)
CLA: trivial.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2674)

crypto/mem.c

index aae92d41b11996148861b388a1a9eb8d64d67796..0584814f73286f1bd1c06d9f9adc3c5b49aadc8f 100644 (file)
@@ -162,7 +162,7 @@ void *CRYPTO_malloc(size_t num, const char *file, int line)
     if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)
         return malloc_impl(num, file, line);
 
-    if (num <= 0)
+    if (num == 0)
         return NULL;
 
     FAILTEST();