diff options
author | Hikar <hikar@davelog.net> | 2017-02-18 08:44:49 +0100 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2017-02-21 18:30:23 +0100 |
commit | 5e1f879ab5a2bfdf2d58222f965f93fe1b511ce7 (patch) | |
tree | 75c0d0437f7e97834f88411d1660c003d99b0819 /crypto/mem.c | |
parent | Ensure minsize >= sizeof(SH_LIST) (diff) | |
download | openssl-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.c | 2 |
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(); |