From: Ben Laurie Date: Wed, 21 May 2014 11:03:02 +0000 (+0100) Subject: Remove redundant test. X-Git-Tag: OpenSSL_1_0_2-beta2~197 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4f7236edc7d5c384bdb148faf7b23f887cf18f69;p=oweals%2Fopenssl.git Remove redundant test. --- diff --git a/crypto/buffer/buf_str.c b/crypto/buffer/buf_str.c index 07840b57c4..60dab54344 100644 --- a/crypto/buffer/buf_str.c +++ b/crypto/buffer/buf_str.c @@ -79,13 +79,10 @@ char *BUF_strdup(const char *str) char *BUF_strndup(const char *str, size_t siz) { char *ret; - size_t len; if (str == NULL) return(NULL); - len = BUF_strnlen(str, siz); - if (siz > len) - siz = len; + siz = BUF_strnlen(str, siz); ret=OPENSSL_malloc(siz+1); if (ret == NULL)