RT3023: Redundant logical expressions

Remove some redundant logical expressions

Reviewed-by: Emilia Kasper <emilia@silkandcyanide.net>
This commit is contained in:
Hans Wennborg 2014-08-15 00:54:00 -04:00 committed by Rich Salz
parent 5effa35610
commit 01e438f288
2 changed files with 1 additions and 3 deletions

View File

@ -75,7 +75,6 @@ int ASN1_PRINTABLE_type(const unsigned char *s, int len)
#ifndef CHARSET_EBCDIC #ifndef CHARSET_EBCDIC
if (!( ((c >= 'a') && (c <= 'z')) || if (!( ((c >= 'a') && (c <= 'z')) ||
((c >= 'A') && (c <= 'Z')) || ((c >= 'A') && (c <= 'Z')) ||
(c == ' ') ||
((c >= '0') && (c <= '9')) || ((c >= '0') && (c <= '9')) ||
(c == ' ') || (c == '\'') || (c == ' ') || (c == '\'') ||
(c == '(') || (c == ')') || (c == '(') || (c == ')') ||

View 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)) if (!ssl3_setup_buffers(s))
return(-1); return(-1);
/* XXX: check what the second '&& type' is about */
if ((type && (type != SSL3_RT_APPLICATION_DATA) && if ((type && (type != SSL3_RT_APPLICATION_DATA) &&
(type != SSL3_RT_HANDSHAKE) && type) || (type != SSL3_RT_HANDSHAKE)) ||
(peek && (type != SSL3_RT_APPLICATION_DATA))) (peek && (type != SSL3_RT_APPLICATION_DATA)))
{ {
SSLerr(SSL_F_DTLS1_READ_BYTES, ERR_R_INTERNAL_ERROR); SSLerr(SSL_F_DTLS1_READ_BYTES, ERR_R_INTERNAL_ERROR);