RT3023: Redundant logical expressions
authorHans Wennborg <hans@chromium.org>
Fri, 15 Aug 2014 04:54:00 +0000 (00:54 -0400)
committerRich Salz <rsalz@akamai.com>
Fri, 15 Aug 2014 14:45:00 +0000 (10:45 -0400)
Remove some redundant logical expressions

Reviewed-by: Emilia Kasper <emilia@silkandcyanide.net>
crypto/asn1/a_print.c
ssl/d1_pkt.c

index d18e772320441eda7cfda018c4adcd87eab7dcf4..2e4c5b5f13cf5e5a5c8fe6a245395e1e593abae5 100644 (file)
@@ -75,7 +75,6 @@ int ASN1_PRINTABLE_type(const unsigned char *s, int len)
 #ifndef CHARSET_EBCDIC
                if (!(  ((c >= 'a') && (c <= 'z')) ||
                        ((c >= 'A') && (c <= 'Z')) ||
-                       (c == ' ') ||
                        ((c >= '0') && (c <= '9')) ||
                        (c == ' ') || (c == '\'') ||
                        (c == '(') || (c == ')') ||
index 611fc8db5769fb749ac7a289be7f7de2150f6738..ed246a007807c9c59e96664e28f9154254150377 100644 (file)
@@ -758,9 +758,8 @@ int dtls1_read_bytes(SSL *s, int type, unsigned char *buf, int len, int peek)
                if (!ssl3_setup_buffers(s))
                        return(-1);
 
-    /* XXX: check what the second '&& type' is about */
        if ((type && (type != SSL3_RT_APPLICATION_DATA) && 
-               (type != SSL3_RT_HANDSHAKE) && type) ||
+               (type != SSL3_RT_HANDSHAKE)) ||
            (peek && (type != SSL3_RT_APPLICATION_DATA)))
                {
                SSLerr(SSL_F_DTLS1_READ_BYTES, ERR_R_INTERNAL_ERROR);