Remove redundant test.
authorBen Laurie <ben@links.org>
Wed, 21 May 2014 11:03:02 +0000 (12:03 +0100)
committerBen Laurie <ben@links.org>
Wed, 21 May 2014 11:03:50 +0000 (12:03 +0100)
crypto/buffer/buf_str.c

index 07840b57c402cbc193e91156ff671c6caf87de38..60dab54344ce98d89b669df50abeb1f140dba87a 100644 (file)
@@ -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)