summaryrefslogtreecommitdiffstats
path: root/crypto/mem.c
diff options
context:
space:
mode:
authorHikar <hikar@davelog.net>2017-02-18 08:44:49 +0100
committerRich Salz <rsalz@openssl.org>2017-02-21 18:30:23 +0100
commit5e1f879ab5a2bfdf2d58222f965f93fe1b511ce7 (patch)
tree75c0d0437f7e97834f88411d1660c003d99b0819 /crypto/mem.c
parentEnsure minsize >= sizeof(SH_LIST) (diff)
downloadopenssl-5e1f879ab5a2bfdf2d58222f965f93fe1b511ce7.tar.xz
openssl-5e1f879ab5a2bfdf2d58222f965f93fe1b511ce7.zip
Removed ugly size_t less than zero check.
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)
Diffstat (limited to 'crypto/mem.c')
-rw-r--r--crypto/mem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/mem.c b/crypto/mem.c
index aae92d41b1..0584814f73 100644
--- a/crypto/mem.c
+++ b/crypto/mem.c
@@ -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();